Re: [Distutils] distlib and data files => resources ?
I'd be expecting these files under /usr/share/ and being read only... I don't agree with "Data files should never be installed to package directories"... LFHS is not a religion. I can see cases where is not appropriate. The main difference could be a library vs an application case: they have clearly different requirements (so I'm expecting the application global config files to be under /etc). Someone mentioned different scenarios (app vs library, user vs system integrator vs developer etc I hope this helps Thanks Antonio On Wed 21/11/12 04:21, "PJ Eby" p...@telecommunity.com wrote: > On Tue, Nov 20, 2012 at 3:18 AM, Ronald Oussoren > wrote: > > On 19 Nov, 2012, at 20:26, PJ Eby wrote: > > > > > > Data files should never be installed to package directories. But > Im not aware of any good reason why resource files should ever be > installed anywhere *else*. > > To be (too) snarky: because the FHS says so. > > Less snarky, Linux distributors try to keep simular files together > (for example storing all gettext translations together in > /usr/share/locale). To play nice in such an enviroment Python > packages would have to install resource files outside of the python > package and into the FHS specified directory structure. > Consider the example of a web page template containing embedded > Python code. Is that a data file containing code, or a code file > containing data? Where does the FHS say it goes? > > What if its not embedded Python, but an embedded DSL interpreted by > the package it goes with? > > What if its not a page template, but a precompiled SQL grammar? > (Such as was distributed with the "gadfly" package, many a year ago.) > > These are the kind of files I mean by "resources". If somebody > wants to support gettext or similar localization, then obviously they > should declare the files data -- or better yet, as part of an explicit > localization category. > > The whole point of "resources" is that its a catch-all for static > data thats more convenient to treat as a standalone source file than > to inline as a huge triple-quoted constant in a .py file. ;-) > > > ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] Generating two Debian packages with stdeb
I have modified the debian/control file to produce two .debs. I have no idea, however, how to correctly use override_dh_autobuild in debian/rules to put files in the appropriate sub directories. My google-fu seems weak, and I haven't been able to find an answer on the internet either. Could you provide a simple example for how I should do it? Thanks, Eddie On 11/20/2012 02:27 PM, Jan Dittberner wrote: On Tue, Nov 20, 2012 at 01:30:43PM +0100, Edward Ekelund wrote: Hi, I'm wondering if there is a way to generate two .deb-files from a single setup.py file. Or, if that's not possible, generate deb files from custom-named setup.py files, e.g. client_setup.py & server_setup.py. You can just use setup.py and move the files to appropriate sub directories of the debian/ directory in a override_dh_autobuild rule in your debian/rules file. You will have to define appropriate binary package stanzas in your debian/control file. Regards Jan Dittberner ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] Generating two Debian packages with stdeb
On Wed, Nov 21, 2012 at 11:03:45AM +0100, Edward Ekelund wrote: > I have modified the debian/control file to produce two .debs. I have > no idea, however, how to correctly use override_dh_autobuild in > debian/rules to put files in the appropriate sub directories. My > google-fu seems weak, and I haven't been able to find an answer on > the internet either. > > Could you provide a simple example for how I should do it? use override_dh_autoinstall -- 8< --- example: debian/rules --- #!/usr/bin/make -f override_dh_auto_install: python setup.py install --install-layout=deb \ --root $(CURDIR)/debian/python-xyzclient mkdir -p $(CURDIR)/debian/python-xyzserver/usr/share/pyshared/xyz mv \ $(CURDIR)/debian/python-xyzclient/usr/share/pyshared/xyz/server.py \ $(CURDIR)/debian/python-xyzserver/usr/share/pyshared/xyz/ ... %: dh $@ --with python2 --buildsystem=python_distutils -- 8< - override_dh_autobuild would be too early, sorry for the confusion. You basically prepare the files for each binary package in a separate subdirectory of your debian/ directory. Debhelper's dh sequencer takes care of building the proper binary packages. Be aware that package names like python-xyzserver and python-xyzclient are not compliant with the Debian Python policy (they should be named python- and you should have separate modules for client and server to allow this split in a policy conforming way). Regards Jan -- Jan Dittberner - Debian Developer GPG-key: 4096R/558FB8DD 2009-05-10 B2FF 1D95 CE8F 7A22 DF4C F09B A73E 0055 558F B8DD http://www.dittberner.info/ signature.asc Description: Digital signature ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig