[Python-modules-commits] [python-trezor] 04/07: Build Python 3 package and switch to pybuild.

Tristan Seligmann mithrandi at moszumanska.debian.org
Tue Dec 12 07:50:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

mithrandi pushed a commit to branch master
in repository python-trezor.

commit 1c0651e3dfce1f7c4f56283d684eb7b0501fd0e3
Author: Tristan Seligmann <mithrandi at mithrandi.net>
Date:   Mon Dec 11 08:20:03 2017 +0200

    Build Python 3 package and switch to pybuild.
---
 debian/changelog              |  2 ++
 debian/control                | 39 ++++++++++++++++++++++++++++++++++++---
 debian/copyright              |  1 -
 debian/lintian-overrides      |  2 --
 debian/python-trezor.pyremove |  1 +
 debian/python-trezor.udev     | 12 ------------
 debian/rules                  |  9 +++++----
 debian/trezor.udev            | 13 +++++++++++++
 8 files changed, 57 insertions(+), 22 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0fc045e..d203a89 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 python-trezor (0.7.16-1) unstable; urgency=medium
 
   * New upstream release.
+  * Build Python 3 package and switch to pybuild.
+  * Update udev rules.
 
  -- Tristan Seligmann <mithrandi at debian.org>  Mon, 11 Dec 2017 07:48:42 +0200
 
diff --git a/debian/control b/debian/control
index b10840a..f7f28ab 100644
--- a/debian/control
+++ b/debian/control
@@ -4,18 +4,51 @@ Uploaders: Tristan Seligmann <mithrandi at debian.org>
 Section: python
 Homepage: https://github.com/trezor/python-trezor
 Priority: optional
-Build-Depends: python-setuptools, python-all, debhelper (>=9), dh-python
+Build-Depends:
+ debhelper (>=9),
+ dh-python,
+ python-all,
+ python-setuptools,
+ python3-all,
+ python3-setuptools,
 Standards-Version: 3.9.8
 Vcs-Browser: https://anonscm.debian.org/git/python-modules/packages/python-trezor.git
 Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/python-trezor.git
 
+Package: trezor
+Architecture: all
+Depends: ${misc:Depends}, ${python3:Depends}, python3-trezor
+Section: utils
+Description: utilities for communicating with TREZOR Bitcoin HW wallet
+ No matter how unprotected your computer or internet connection might be,
+ your coins always stay safe with TREZOR as it never exposes your private keys.
+ TREZOR is an isolated environment for offline transaction signing and using
+ a small display you can visually verify the transaction contents. That's why
+ all operations using TREZOR are entirely safe.
+ .
+ This package contains the trezorctl binary for interacting with a TREZOR
+ wallet, and the udev rules needed to make the device accessible.
+
 Package: python-trezor
 Architecture: all
 Depends: ${misc:Depends}, ${python:Depends}
-Description: library for communicating with TREZOR Bitcoin HW wallet
+Description: library for communicating with TREZOR Bitcoin HW wallet (Python 2)
  No matter how unprotected your computer or internet connection might be,
  your coins always stay safe with TREZOR as it never exposes your private keys.
  TREZOR is an isolated environment for offline transaction signing and using
  a small display you can visually verify the transaction contents. That's why
- all operations using TREZOR are entirely safe. 
+ all operations using TREZOR are entirely safe.
+ .
+ This package contains the Python 2 version of python-trezor.
 
+Package: python3-trezor
+Architecture: all
+Depends: ${misc:Depends}, ${python3:Depends}
+Description: library for communicating with TREZOR Bitcoin HW wallet (Python 3)
+ No matter how unprotected your computer or internet connection might be,
+ your coins always stay safe with TREZOR as it never exposes your private keys.
+ TREZOR is an isolated environment for offline transaction signing and using
+ a small display you can visually verify the transaction contents. That's why
+ all operations using TREZOR are entirely safe.
+ .
+ This package contains the Python 3 version of python-trezor.
diff --git a/debian/copyright b/debian/copyright
index 7ad3d00..d92b4c8 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -51,4 +51,3 @@ License: GPL-3+
  On Debian systems, the full text of the GNU General Public
  License version 3 can be found in the file
  `/usr/share/common-licenses/GPL-3'.
-
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
index 1664492..2bf1690 100644
--- a/debian/lintian-overrides
+++ b/debian/lintian-overrides
@@ -1,3 +1 @@
-library-package-name-for-application usr/bin/trezorctl
-application-in-library-section python usr/bin/trezorctl
 binary-without-manpage usr/bin/trezorctl
diff --git a/debian/python-trezor.pyremove b/debian/python-trezor.pyremove
new file mode 100644
index 0000000..c2c57a4
--- /dev/null
+++ b/debian/python-trezor.pyremove
@@ -0,0 +1 @@
+bin/trezorctl
diff --git a/debian/python-trezor.udev b/debian/python-trezor.udev
deleted file mode 100644
index aa411f5..0000000
--- a/debian/python-trezor.udev
+++ /dev/null
@@ -1,12 +0,0 @@
-# TREZOR: The Hardware Bitcoin Wallet
-# http://bitcointrezor.com/
-# Put this file into /usr/lib/udev/rules.d
-
-# Raspbian does not understand the new TAG+="uaccess", TAG+="udev-acl" syntax, use MODE+GROUP for now ... :-(
-
-# TREZOR
-SUBSYSTEM=="usb", ATTR{idVendor}=="534c", ATTR{idProduct}=="0001", MODE="0666", GROUP="dialout", SYMLINK+="trezor%n"
-KERNEL=="hidraw*", ATTRS{idVendor}=="534c", ATTRS{idProduct}=="0001",  MODE="0666", GROUP="dialout"
-
-# TREZOR Raspberry Pi Shield
-SUBSYSTEM=="usb", ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea80", MODE="0666", GROUP="dialout", SYMLINK+="trezor%n"
diff --git a/debian/rules b/debian/rules
index 51bacfc..3966ed6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,8 +1,9 @@
 #!/usr/bin/make -f
 
-# This file was automatically generated by stdeb 0.6.0+git at
-# Wed, 24 Sep 2014 22:57:50 +0200
+export DH_VERBOSE=1
+export PYBUILD_NAME=trezor
+export PYBUILD_AFTER_INSTALL_python2=rm -r {destdir}/usr/bin
+export PYBUILD_AFTER_INSTALL_python3=mkdir -p debian/trezor/usr/bin && mv {destdir}/usr/bin/trezorctl debian/trezor/usr/bin
 
 %:
-	dh $@ --with python2 --buildsystem=python_distutils
-
+	dh $@ --with python2,python3 --buildsystem=pybuild
diff --git a/debian/trezor.udev b/debian/trezor.udev
new file mode 100644
index 0000000..bd8a838
--- /dev/null
+++ b/debian/trezor.udev
@@ -0,0 +1,13 @@
+# TREZOR: The Original Hardware Wallet
+# https://trezor.io/
+# Put this file into /usr/lib/udev/rules.d
+
+# TREZOR
+SUBSYSTEM=="usb", ATTR{idVendor}=="534c", ATTR{idProduct}=="0001", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="trezor%n"
+KERNEL=="hidraw*", ATTRS{idVendor}=="534c", ATTRS{idProduct}=="0001",  MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl"
+
+# TREZOR v2
+SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="53c0", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="trezor%n"
+SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="53c1", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="trezor%n"
+KERNEL=="hidraw*", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="53c0",  MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl"
+KERNEL=="hidraw*", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="53c1",  MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-trezor.git



More information about the Python-modules-commits mailing list