Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dh_python3: how to use .pydist file?

134 views
Skip to first unread message

Nikolaus Rath

unread,
Feb 17, 2015, 12:30:02 AM2/17/15
to
Hello,

I'm trying to get dh_python to generate versioned dependencies for the
s3ql package (available in the python-apps SVN repository).

I have created a file debian/s3ql.pydist with the contents:

$ cat debian/s3ql.pydist
dugong python3-dugong; PEP386

The requirements in setup.py are:

$ cat src/s3ql.egg-info/requires.txt
apsw >= 3.7.0
pycrypto
requests
defusedxml
dugong >= 3.4
llfuse >= 0.39

When creating the s3ql package, I get the output:

[...]
dh_python3
D: dh_python3 dh_python3:149: version: 1.20141111-2
D: dh_python3 dh_python3:150: argv: ['/usr/bin/dh_python3']
D: dh_python3 dh_python3:151: options: {'depends': None, 'suggests': None, 'skip_private': False, 'no_ext_rename': False, 'recommends': None, 'package': None, 'verbose': False, 'no_shebang_rewrite': False, 'guess_deps': True, 'no_package': None, 'shebang': None, 'vrange': None, 'clean_dbg_pkg': True, 'regexpr': None, 'compile_all': False, 'ignore_shebangs': False, 'arch': None, 'O': None, 'requires': None}
D: dh_python3 dh_python3:152: args: []
D: dh_python3 dh_python3:154: supported Python versions: 3.4 (default=3.4)
D: dh_python3 debhelper:98: source=s3ql, binary packages=['s3ql', 's3ql-dbg']
D: dh_python3 dh_python3:171: processing package s3ql...
I: dh_python3 tools:100: replacing shebang in debian/s3ql/usr/lib/s3ql/benchmark.py
[...]
D: dh_python3 fs:220: package s3ql details = {'public_vers': set(), 'ext_vers': set(), 'nsp.txt': set(), 'private_dirs': {'/usr/lib/s3ql': {'compile': True, 'ext_vers': {Version('3.4')}, 'shebangs': {/usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3}}}, 'requires.txt': {'debian/s3ql/usr/lib/s3ql/s3ql-2.13.egg-info/requires.txt'}, 'egg-info': set(), 'compile': False, 'shebangs': {/usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3, /usr/bin/python3}, 'ext_no_version': set()}
D: dh_python3 depends:107: generating dependencies for package s3ql
D: dh_python3 pydist:121: trying to find dependency for apsw >= 3.7.0 (python=None)
D: dh_python3 pydist:121: trying to find dependency for pycrypto (python=None)
D: dh_python3 pydist:121: trying to find dependency for requests (python=None)
D: dh_python3 pydist:121: trying to find dependency for defusedxml (python=None)
D: dh_python3 pydist:121: trying to find dependency for dugong >= 3.4 (python=None)
D: dh_python3 pydist:121: trying to find dependency for llfuse >= 0.39 (python=None)
D: dh_python3 depends:242: D={'python3:any (>= 3.3.2-2~)', 'python3-requests', 'python3-defusedxml', 'python3-crypto', 'python3-llfuse', 'python3-apsw', 'python3 (>= 3.4~)', 'python3', 'python3 (<< 3.5)', 'python3-dugong'}; R=[]; S=[]; E=[], B=[]; RT=[('/usr/lib/s3ql', '-V 3.4')]
D: dh_python3 dh_python3:171: processing package s3ql-dbg...
[...]

Not surprisingly, the binary package then ends up without the versioned
dependency, and also without the s3ql.pydist file in
/usr/share/dh-python/dist/cpython3/ (as README.PyDist promised).

What am I doing wrong?

Best,
-Nikolaus

--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

»Time flies like an arrow, fruit flies like a Banana.«


--
To UNSUBSCRIBE, email to debian-pyt...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/87h9ulp...@vostro.rath.org

Piotr Ożarowski

unread,
Feb 17, 2015, 7:00:05 AM2/17/15
to
[Nikolaus Rath, 2015-02-17]
> I'm trying to get dh_python to generate versioned dependencies for the
> s3ql package (available in the python-apps SVN repository).
>
> I have created a file debian/s3ql.pydist with the contents:
>
> $ cat debian/s3ql.pydist
> dugong python3-dugong; PEP386

pydist file is not the way to go. Purpose of this file is to customise
what dh_pythonX generates when OTHER packages try to generate dependency
for s3ql (and since your binary package name doesn't have "python"
prefix it should not provide public module/extension and hence not
install pydist file).

What you want is debian/py3dist-overrides file or pydist file
in python3-dugong package
--
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl www.griffith.cc www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


--
To UNSUBSCRIBE, email to debian-pyt...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20150217115...@sts0.p1otr.com

Nikolaus Rath

unread,
Feb 17, 2015, 1:00:02 PM2/17/15
to
On Feb 17 2015, Piotr Ożarowski <pi...@debian.org> wrote:
> [Nikolaus Rath, 2015-02-17]
>> I'm trying to get dh_python to generate versioned dependencies for the
>> s3ql package (available in the python-apps SVN repository).
>>
>> I have created a file debian/s3ql.pydist with the contents:
>>
>> $ cat debian/s3ql.pydist
>> dugong python3-dugong; PEP386
>
> pydist file is not the way to go. Purpose of this file is to customise
> what dh_pythonX generates when OTHER packages try to generate dependency
> for s3ql (and since your binary package name doesn't have "python"
> prefix it should not provide public module/extension and hence not
> install pydist file).
>
> What you want is debian/py3dist-overrides file or pydist file
> in python3-dugong package

Oh, ok. Where do I find the format of the py3dist-overrides file?
Neither dh_python3(1), nor /usr/share/doc/dh-python, nor Google was able
to tell me...

Thanks!
-Nikolaus

--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

»Time flies like an arrow, fruit flies like a Banana.«


--
To UNSUBSCRIBE, email to debian-pyt...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/87r3tof...@thinkpad.rath.org

Piotr Ożarowski

unread,
Feb 17, 2015, 3:00:04 PM2/17/15
to
[Nikolaus Rath, 2015-02-17]
> Oh, ok. Where do I find the format of the py3dist-overrides file?

it's the same as in pydist files ("name debian-name")
signature.asc

Ben Finney

unread,
Feb 17, 2015, 4:50:03 PM2/17/15
to
Piotr Ożarowski <pi...@debian.org> writes:

> [Nikolaus Rath, 2015-02-17]
> > Oh, ok. Where do I find the format of the py3dist-overrides file?
>
> it's the same as in pydist files ("name debian-name")

The question remains, though: where should that fact (and many others
like it) be documented so newcomers don't have to keep asking?

--
\ “Life does not cease to be funny when people die any more than |
`\ it ceases to be serious when people laugh.” —George Bernard Shaw |
_o__) |
Ben Finney


--
To UNSUBSCRIBE, email to debian-pyt...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/85iof0b...@benfinney.id.au

Piotr Ożarowski

unread,
Feb 17, 2015, 5:00:02 PM2/17/15
to
[Ben Finney, 2015-02-17]
> The question remains, though: where should that fact (and many others
> like it) be documented so newcomers don't have to keep asking?

I guess "dependencies" section in dh.python{2,3} manpage should be more
clear that README.PyDist is about .pydist and pydist-overrides files.
Patches are welcome.
--
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl www.griffith.cc www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


--
To UNSUBSCRIBE, email to debian-pyt...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20150217215...@sts0.p1otr.com

Nikolaus Rath

unread,
Feb 17, 2015, 7:30:03 PM2/17/15
to
On Feb 17 2015, Piotr Ożarowski <pi...@debian.org> wrote:
> [Ben Finney, 2015-02-17]
>> The question remains, though: where should that fact (and many others
>> like it) be documented so newcomers don't have to keep asking?
>
> I guess "dependencies" section in dh.python{2,3} manpage should be more
> clear that README.PyDist is about .pydist and pydist-overrides files.
> Patches are welcome.

Already done after your first response (#778633) :-).

Best,
-Nikolaus

--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

»Time flies like an arrow, fruit flies like a Banana.«


--
To UNSUBSCRIBE, email to debian-pyt...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/87d258f...@thinkpad.rath.org

Nikolaus Rath

unread,
Feb 18, 2015, 12:00:02 AM2/18/15
to
On Feb 17 2015, Nikolaus Rath <Niko...@rath.org> wrote:
> On Feb 17 2015, Piotr Ożarowski <pi...@debian.org> wrote:
>> [Ben Finney, 2015-02-17]
>>> The question remains, though: where should that fact (and many others
>>> like it) be documented so newcomers don't have to keep asking?
>>
>> I guess "dependencies" section in dh.python{2,3} manpage should be more
>> clear that README.PyDist is about .pydist and pydist-overrides files.
>> Patches are welcome.
>
> Already done after your first response (#778633) :-).

Here's a revised patch that also documents the format of the
py3dist-overrides file:

patch2.diff

Piotr Ożarowski

unread,
Feb 18, 2015, 4:10:02 AM2/18/15
to
[Nikolaus Rath, 2015-02-18]
> Here's a revised patch that also documents the format of the
> py3dist-overrides file:

thanks!
--
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl www.griffith.cc www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


--
To UNSUBSCRIBE, email to debian-pyt...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20150218090...@sts0.p1otr.com
0 new messages