Re: Best practice: .egg-info with pybuild from git
On 11/21/2013 08:28 PM, Mathias Behrle wrote: > So finally I would appreciate any input on > > 1) Which is the preferred procedure to handle .egg-info directories together >with building from git? > > 2) Is there a way to satisfy all common build tools as debuild, >git-buildpackage, pbuilder, when running the build more than once? > > Thanks, > Mathias Hi Mathias, Thanks for raising this important topic. I've seen all sorts of ways to fix this problem. What I found the most easy was to simply add: extend-diff-ignore = "^[^/]*[.]egg-info/" in debian/source/options. That's just a one liner, and it solves all problems. I've found this in a package, and I now use it. Probably there's a better regular expression, I didn't investigate, though that one above works well. Comments on it are welcome. Does anyone have a counter-argument for (not) doing this? Cheers, Thomas Goirand (zigo) -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/528e4909.3010...@debian.org
Re: Best practice: .egg-info with pybuild from git
[Thomas Goirand, 2013-11-21] > On 11/21/2013 08:28 PM, Mathias Behrle wrote: > > So finally I would appreciate any input on > > > > 1) Which is the preferred procedure to handle .egg-info directories together > >with building from git? > > > > 2) Is there a way to satisfy all common build tools as debuild, > >git-buildpackage, pbuilder, when running the build more than once? > > > > Thanks, > > Mathias > > Hi Mathias, > > Thanks for raising this important topic. > > I've seen all sorts of ways to fix this problem. What I found the most > easy was to simply add: > > extend-diff-ignore = "^[^/]*[.]egg-info/" this line will tell dpkg-source to ignore these files but they're already ignored - pybuild removes them in clean target and dpkg-source ignores deleted files. I think Mathias is asking about how to tell git that it should ignore these files as well. IMO you should ask upstream to not ship these files in git repo/tarballs or remove them in the first commit after each merge with upstream. -- 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 signature.asc Description: Digital signature
Best practice: .egg-info with pybuild from git
Hello Pythonistas, I am just searching for some input/confirmation for the best practice with respect to .egg-info provided in upstream tarballs. My initial approach was based on the recommendations in the Python Library Style Guide [1] and App Style Guide [2] to avoid evtl. double build failures [3]. Using override_dh_auto_clean: dh_auto_clean rm -rf build rm -rf *.egg-info works for the tested build methods debuild, pbuilder and git-buildpackage, but has (when building from git) the disadvantage of leaving the git repository in a different state. As a workaround my sponsor made me think to use rather a renaming procedure instead of deletion like override_dh_auto_build: mv $(PACKAGE_NAME).egg-info $(PACKAGE_NAME).hen-info dh_auto_build override_dh_auto_install: dh_auto_install rm -rf *.egg-info mv $(PACKAGE_NAME).hen-info $(PACKAGE_NAME).egg-info mv PKG-INFO.hen PKG-INFO which also worked as long as using dh ${@} --with python2 Now with the switch to enable dh_python3 and using dh ${@} --with python2,python3 --buildsystem=pybuild this doesn't work anymore with pbuilder failing with make[1]: Entering directory `/tmp/buildd/python-sql-0.2' mv python_sql.egg-info python_sql.hen-info mv: der Aufruf von stat für „python_sql.egg-info“ ist nicht möglich: No such file or directory make[1]: *** [override_dh_auto_build] Fehler 1 because pybuild seems to remove .egg-info by itself (leaving the build dir in a different state than it was before building). So finally I would appreciate any input on 1) Which is the preferred procedure to handle .egg-info directories together with building from git? 2) Is there a way to satisfy all common build tools as debuild, git-buildpackage, pbuilder, when running the build more than once? Thanks, Mathias [1] https://wiki.debian.org/Python/LibraryStyleGuide [2] https://wiki.debian.org/Python/AppStyleGuide [3] https://lists.debian.org/debian-python/2012/05/msg00039.html signature.asc Description: PGP signature
Best practice: exclude generated ‘foo.egg-info’ files from source and VCS (was: Best practice: .egg-info with pybuild from git)
Piotr Ożarowski writes: > I think Mathias is asking about how to tell git that it should ignore > these files as well. IMO you should ask upstream to not ship these > files in git repo/tarballs or remove them in the first commit after > each merge with upstream. Yes, the best course is to convince upstream to ship proper source tarballs, instead of bundling generated non-source files in the source tarball. In the long term, the solution includes educating upstream not to put non-source files like the ‘foo.egg-info’ directory into the VCS. Files that need to be generated should be generated when creating the release tarballs, not tracked in VCS. That may entail users of a hosting service to convince the provider to improve tools for automatically generating the source tarballs. That's a matter for those users and the provider to work out – and is a good reason not to have everyone on e.g. GitHub, for example, so there can be meaningful competition between hosting providers. -- \ “It's a small world, but I wouldn't want to have to paint it.” | `\—Steven Wright | _o__) | Ben Finney -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/7wr4a9tgsg.fsf...@benfinney.id.au