@@ -7,47 +7,47 @@ py2deb: Python to Debian package converter
7
7
.. image :: https://coveralls.io/repos/paylogic/py2deb/badge.svg?branch=master
8
8
:target: https://coveralls.io/r/paylogic/py2deb?branch=master
9
9
10
- The Python package ` py2deb ` converts Python source distributions to Debian
11
- binary packages (the ones used for installation). It uses pip-accel _ to
12
- download, unpack and compile Python packages. Because of this ` py2deb ` is
13
- compatible with the command line interface of the ``pip install `` command. For
14
- example you can specify packages to convert as command line arguments but you
15
- can also use `requirement files `_ if you want.
10
+ The Python package py2deb _ converts Python source distributions to Debian
11
+ binary packages (the ones used for installation). It uses pip-accel _ (based on
12
+ pip _) to download, unpack and compile Python packages. Because of this py2deb _
13
+ is compatible with the command line interface of the ``pip install `` command.
14
+ For example you can specify packages to convert as command line arguments but
15
+ you can also use `requirement files `_ if you want.
16
16
17
17
During the conversion process dependencies are automatically taken into account
18
18
and converted as well so you don't actually have to use requirement files
19
19
including transitive dependencies. In fact you might prefer not explicitly
20
- listing your transitive dependencies in requirement files because ` py2deb ` will
20
+ listing your transitive dependencies in requirement files because py2deb _ will
21
21
translate the version constraints of Python packages into Debian package
22
22
relationships.
23
23
24
- The ` py2deb ` package is currently tested on CPython _ 2.7, 3.5, 3.6, 3.7 and
25
- PyPy _ ( 2 and 3) . Unfortunately Python 3.8+ is not yet supported, a significant
26
- upcoming refactoring is required to resolve this. For usage instructions please
27
- refer to the documentation hosted on ` Read The Docs `_.
24
+ The py2deb _ package is currently tested on CPython _ 2.7, 3.5, 3.6, 3.7 and
25
+ PyPy _ 2 and 3. Unfortunately Python 3.8+ is not yet supported (see below). For
26
+ usage instructions please refer to the documentation hosted on ` Read The
27
+ Docs `_.
28
28
29
29
.. contents ::
30
30
:local:
31
31
32
32
Installation
33
33
------------
34
34
35
- The ` py2deb ` package is available on PyPI _, so installation is very simple:
35
+ The py2deb _ package is available on PyPI _, so installation is very simple:
36
36
37
37
.. code-block :: console
38
38
39
39
$ pip install py2deb
40
40
41
41
There are some system dependencies which you have to install as well:
42
42
43
- .. code-block :: sh
43
+ .. code-block :: console
44
44
45
45
$ sudo apt-get install dpkg-dev fakeroot
46
46
47
47
Optionally you can also install Lintian _ (which is not a hard dependency but
48
48
more of a "nice to have"):
49
49
50
- .. code-block :: sh
50
+ .. code-block :: console
51
51
52
52
$ sudo apt-get install lintian
53
53
@@ -61,7 +61,7 @@ mature.
61
61
Usage
62
62
-----
63
63
64
- There are two ways to use the ` py2deb ` package: As the command line program
64
+ There are two ways to use the py2deb _ package: As the command line program
65
65
``py2deb `` and as a Python API. For details about the Python API please refer
66
66
to the API documentation hosted on `Read the Docs `_. The command line interface
67
67
is described below.
@@ -166,25 +166,64 @@ So the "--" marker separates the py2deb options from the pip options.
166
166
Future improvements
167
167
-------------------
168
168
169
- Some random ideas for possible improvements to py2deb (in no specific order):
169
+ The following sections list possible improvements to the project:
170
+
171
+ .. contents ::
172
+ :local:
173
+
174
+ .. _Python 3.8+ compatibility :
175
+
176
+ Python 3.8+ compatibility
177
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
178
+
179
+ The py2deb _ project builds on top of pip-accel _, which was developed between
180
+ 2013 and 2015 on top of ``pip >= 7.0, < 7.2 ``. Since that time pip _ has grown
181
+ enormously: At the time of writing (in August 2020) we're now at pip 20!
182
+
183
+ None of the improvements made between pip 7-20 are available in pip-accel and
184
+ py2deb and this has become somewhat of a glaring issue that plenty of users
185
+ have run into (see `#17 `_, `#18 `_, `#27 `_ and `#31 `_).
186
+
187
+ Known issues being caused by this include:
188
+
189
+ - The old pip version prevents Python 3.8+ compatibility.
190
+
191
+ - The old pip version doesn't know about ``python_requires `` metadata provided
192
+ by PyPI and this forces users to maintain constraints files themselves, even
193
+ though this shouldn't be necessary.
194
+
195
+ - While pip-accel supports installation from wheels, it was never exposed via
196
+ the Python API and so py2deb lacks support for converting wheels (it
197
+ currently needs source distributions).
198
+
199
+ The current state of affairs is best summarized in `this comment `_. I'm hoping
200
+ to complete the upgrade to newer pip and pip-accel releases in the coming weeks
201
+ (as of this writing in August 2020) but can't commit to a date.
170
202
171
- - Find a way to facilitate (explicit / opt-in) installation of system wide
172
- files (not related to Python per se) based on a Python distribution? This
173
- could significantly reduce the need for "wrapper packages" that basically
174
- just pull in packages converted by py2deb and drop a few configuration files
175
- into place.
203
+ .. _this comment : https://github.com/paylogic/py2deb/issues/18#issuecomment-633848582
176
204
177
- - Investigate the feasability of supporting conversion of binary wheels. Slowly
178
- but surely the Python community seems to be gravitating towards (binary)
179
- wheels and once gravity has shifted we don't want to be left in the dust! ;-)
205
+ Installation of system wide files
206
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
180
207
181
- - Make it possible to "replace" Python requirements in a requirement set with a
182
- Debian package that's included in the official repositories (e.g. Pillow _
183
- becomes python-imaging _ or python-pil _). There are some hairy details
184
- involved here .
208
+ Find a way to facilitate (explicit / opt-in) installation of system wide files
209
+ (not related to Python per se) based on a Python distribution? This could
210
+ significantly reduce the need for "wrapper packages" that basically just pull
211
+ in packages converted by py2deb and drop a few configuration files into place .
185
212
186
- - Dive into PEP-440 _ and see if there is a way to fully support it? Then `this
187
- question on Reddit `_ can finally get a satisfying answer :-).
213
+ :Related issues: See issue `#7 `_ for a related discussion.
214
+
215
+ Conversion of binary wheels
216
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
217
+
218
+ Investigate the feasability of supporting conversion of binary wheels. Slowly
219
+ but surely the Python community seems to be gravitating towards (binary) wheels
220
+ and once gravity has shifted we don't want to be left in the dust! 😉
221
+
222
+ Full PEP-440 compatibility
223
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
224
+
225
+ Dive into PEP-440 _ and see if it can be fully supported? Then `this question on
226
+ Reddit `_ can finally get a satisfying answer 🙂.
188
227
189
228
Similar projects
190
229
----------------
@@ -196,7 +235,7 @@ fairly `detailed comparison`_ with each of these projects.
196
235
Contact
197
236
-------
198
237
199
- The latest version of ` py2deb ` is available on PyPI _ and GitHub _. The
238
+ The latest version of py2deb is available on PyPI _ and GitHub _. The
200
239
documentation is hosted on `Read the Docs `_ and includes a changelog _. For
201
240
questions, bug reports, suggestions, etc. please create an issue on GitHub _.
202
241
@@ -208,23 +247,30 @@ This software is licensed under the `MIT license`_.
208
247
© 2020 Peter Odding, Arjan Verwer and Paylogic International.
209
248
210
249
.. External references:
211
- .. _changelog : https://py2deb.readthedocs.io/en/latest/changelog.html
212
250
.. _CPython : https://en.wikipedia.org/wiki/CPython
213
- .. _deb-pkg-tools : https://pypi.org/project/deb-pkg-tools
214
- .. _detailed comparison : https://py2deb.readthedocs.io/en/latest/comparisons.html
215
- .. _dh-virtualenv : https://github.com/spotify/dh-virtualenv
216
- .. _fpm : https://github.com/jordansissel/fpm
217
251
.. _GitHub : https://github.com/paylogic/py2deb
218
252
.. _Lintian : http://en.wikipedia.org/wiki/Lintian
219
253
.. _MIT license : http://en.wikipedia.org/wiki/MIT_License
220
254
.. _PEP-440 : https://www.python.org/dev/peps/pep-0440/
221
255
.. _Pillow : https://python-pillow.github.io/
222
- .. _pip-accel : https://github.com/paylogic/pip-accel
223
256
.. _PyPI : https://pypi.org/project/py2deb
224
257
.. _PyPy : https://en.wikipedia.org/wiki/PyPy
258
+ .. _Read The Docs : https://py2deb.readthedocs.io
259
+ .. _changelog : https://py2deb.readthedocs.io/en/latest/changelog.html
260
+ .. _deb-pkg-tools : https://pypi.org/project/deb-pkg-tools
261
+ .. _detailed comparison : https://py2deb.readthedocs.io/en/latest/comparisons.html
262
+ .. _dh-virtualenv : https://github.com/spotify/dh-virtualenv
263
+ .. _fpm : https://github.com/jordansissel/fpm
264
+ .. _pip-accel : https://pypi.org/project/pip-accel
265
+ .. _pip : https://pypi.org/project/pip
266
+ .. _py2deb : https://pypi.org/project/py2deb
225
267
.. _python-imaging : https://packages.debian.org/search?keywords=python-imaging
226
268
.. _python-pil : https://packages.debian.org/search?keywords=python-pil
227
- .. _Read The Docs : https://py2deb.readthedocs.io
228
269
.. _requirement files : http://www.pip-installer.org/en/latest/cookbook.html#requirements-files
229
270
.. _stdeb : https://pypi.org/project/stdeb
230
271
.. _this question on Reddit : https://www.reddit.com/r/Python/comments/2x7s17/py2deb_python_to_debian_package_converter/coxyyzu
272
+ .. _#7 : https://github.com/paylogic/py2deb/issues/7
273
+ .. _#17 : https://github.com/paylogic/py2deb/issues/17
274
+ .. _#18 : https://github.com/paylogic/py2deb/issues/18
275
+ .. _#27 : https://github.com/paylogic/py2deb/issues/27
276
+ .. _#31 : https://github.com/paylogic/py2deb/issues/31
0 commit comments