Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #8640
| From | Thomas Goirand <zigo@debian.org> |
|---|---|
| Newsgroups | linux.debian.maint.python |
| Subject | Re: Python package providing both modules and an app |
| Date | 2016-07-05 10:40 +0200 |
| Message-ID | <rRu3E-mM-41@gated-at.bofh.it> (permalink) |
| References | <rMBfr-2Hb-9@gated-at.bofh.it> |
| Organization | Debian |
On 06/21/2016 11:13 PM, Hugo Lefeuvre wrote:
> Hi all !
>
> I'm currently packaging python-slugify[0], a Python application for
> slugifying unicode strings. Like here[1] upstream decided to write
> everything as a python module with an entry script placed in /usr/bin
> that calls main(). So we can consider python-slugify as both an application
> and a library.
>
> The package is originally requested as a Python module[2] and it seems
> clear to me that the whole thing is only useful as a library, so I've
> named the source package 'python-slugify'. It provides following packages:
> * 'python-slugify' (Python 2 lib),
> * 'python3-slugify' (Python 3 lib),
> * 'slugify' (ships the entry script[3], depends on python3-slugify).
>
> Everything is working well. However, I'm not really satisfied by the way I
> solved the problem in debian/rules[4]. Does anybody know a better way
> of doing that ?
>
> Cheers,
> Hugo
Hugo,
I did lots of that in OpenStack. You can have a look at one of our tool
to handle the dh_auto_install for Python:
http://anonscm.debian.org/cgit/openstack/openstack-pkg-tools.git/tree/build-tools/pkgos-dh_auto_install
The way to use it in your debian/rules file is to do:
pkgos-alternative slugify slugify
[ this tool is available at:
http://anonscm.debian.org/cgit/openstack/openstack-pkg-tools.git/tree/misc/pkgos-alternative-bin
]
then simply do:
override_dh_auto_install:
pkgos-dh_auto_install
and that's it, it will handle the /usr/bin/python{3,}-slugify
alternative implementations for you.
I hope that helps,
Cheers,
Thomas Goirand (zigo)
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python package providing both modules and an app Hugo Lefeuvre <hle@debian.org> - 2016-06-21 23:20 +0200
Re: Python package providing both modules and an app Ben Finney <ben+debian@benfinney.id.au> - 2016-06-22 03:30 +0200
Re: Python package providing both modules and an app Hugo Lefeuvre <hle@debian.org> - 2016-06-22 22:00 +0200
Re: Python package providing both modules and an app Ben Finney <ben+debian@benfinney.id.au> - 2016-06-23 03:10 +0200
Re: Python package providing both modules and an app Hugo Lefeuvre <hle@debian.org> - 2016-06-23 18:40 +0200
Re: Python package providing both modules and an app Hugo Lefeuvre <hle@debian.org> - 2016-06-30 08:30 +0200
Re: Python package providing both modules and an app Thomas Goirand <zigo@debian.org> - 2016-07-05 10:50 +0200
Re: Python package providing both modules and an app Barry Warsaw <barry@debian.org> - 2016-06-23 03:00 +0200
Python program as a command-line program (was: Python package providing both modules and an app) Ben Finney <ben+debian@benfinney.id.au> - 2016-06-23 03:20 +0200
Re: Python program as a command-line program (was: Python package providing both modules and an app) Barry Warsaw <barry@debian.org> - 2016-06-24 21:30 +0200
Re: Python program as a command-line program Ben Finney <ben+debian@benfinney.id.au> - 2016-06-27 09:00 +0200
Re: Python package providing both modules and an app Ian Cordasco <graffatcolmingov@gmail.com> - 2016-06-23 03:30 +0200
Re: Python package providing both modules and an app Thomas Goirand <zigo@debian.org> - 2016-07-05 10:40 +0200
Re: Python package providing both modules and an app Hugo Lefeuvre <hle@debian.org> - 2016-07-05 16:50 +0200
Re: Python package providing both modules and an app Thomas Goirand <zigo@debian.org> - 2016-07-05 21:00 +0200
csiph-web