debian: Do not package hgext3rd/__init__.py

When installed into a path like /usr/lib/python2.7/dist-packages, this file
conflicts with the hgext3rd/__init__.py from mercurial itself.  Let's keep the
mercurial version the canonical one, and just skip packaging this one.

I added a warning to this repo's __init__.py about behavior divergences between
this __init__.py and mercurial's version.
This commit is contained in:
Kyle Lippincott 2016-12-19 16:34:49 -08:00
parent d3424dd296
commit 5c73644ae8
2 changed files with 11 additions and 0 deletions

View File

@ -9,3 +9,8 @@
override_dh_auto_install:
python$(PYVERS) setup.py install --root $(CURDIR)/debian/remotefilelog --install-layout=deb --component remotefilelog
find $(CURDIR)/debian/remotefilelog -name '*.egg-info' -delete
# Explicitly remove the hgext3rd/__init__.py file from the place where we're
# staging the files for build. Mercurial provides
# <python>/dist-packages/hgext3rd/__init__.py normally, we do not want to
# conflict.
find $(CURDIR)/debian/remotefilelog -wholename '*/hgext3rd/__init__.py' -delete

View File

@ -3,3 +3,9 @@ import pkgutil
# Indicate that hgext3rd is a namspace package, and other python path
# directories may still be searched for hgext3rd extensions.
__path__ = pkgutil.extend_path(__path__, __name__)
### IMPORTANT ###
# Do not add logic here that would diverge from mercurial's
# hgext3rd/__init__.py, the installed version of the file on debian systems is
# provided by mercurial itself; the packaging rules for remotefilelog explicitly
# ignore the file you're reading now.