# HG changeset patch # User Pierre-Yves David # Date 1458231138 25200 # Node ID 85390446f8c1bc611c94c87dd39f4b28c73a39ec # Parent b65f39791f923c88927b7387859ee5582e37f2ef packaging: fix setup.py and install as hgext3rd.topic This changeset is doing two things (gasp): - It fixes various errors in the setup.py - It move the topic source and install into hgext3rd.topic. This last part (code source move) use hgext3rd as namespace package to prevent installation nightmare. This won't be officially supported until Mercurial 3.8, but in the meantime, 3.7 user can enable it using the full package name: [extensions] hgext3rd.topic= Thanks goes to Julien Cristau for the initial version of this. diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -13,3 +13,8 @@ [extensions] topics=path/to/hg-topics/src + +If you are using Mercurial 3.7 use: + + [extensions] + hgext3rd.topics=path/to/hg-topics/src diff --git a/hgext3rd/__init__.py b/hgext3rd/__init__.py new file mode 100644 --- /dev/null +++ b/hgext3rd/__init__.py @@ -0,0 +1,3 @@ +from __future__ import absolute_import +import pkgutil +__path__ = pkgutil.extend_path(__path__, __name__) diff --git a/src/topic/__init__.py b/hgext3rd/topic/__init__.py rename from src/topic/__init__.py rename to hgext3rd/topic/__init__.py diff --git a/src/topic/constants.py b/hgext3rd/topic/constants.py rename from src/topic/constants.py rename to hgext3rd/topic/constants.py diff --git a/src/topic/destination.py b/hgext3rd/topic/destination.py rename from src/topic/destination.py rename to hgext3rd/topic/destination.py diff --git a/src/topic/discovery.py b/hgext3rd/topic/discovery.py rename from src/topic/discovery.py rename to hgext3rd/topic/discovery.py diff --git a/src/topic/revset.py b/hgext3rd/topic/revset.py rename from src/topic/revset.py rename to hgext3rd/topic/revset.py diff --git a/src/topic/stack.py b/hgext3rd/topic/stack.py rename from src/topic/stack.py rename to hgext3rd/topic/stack.py diff --git a/src/topic/topicmap.py b/hgext3rd/topic/topicmap.py rename from src/topic/topicmap.py rename to hgext3rd/topic/topicmap.py diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -14,9 +14,9 @@ maintainer_email='augie@google.com', url='http://bitbucket.org/durin42/hg-topics/', description='Experimental tinkering with workflow ideas for topic branches.', - long_description=open('README').read(), + long_description=open('README.md').read(), keywords='hg mercurial', license='GPLv2+', - py_modules=['src'], + packages=['hgext3rd.topic'], install_requires=requires, ) diff --git a/tests/testlib b/tests/testlib --- a/tests/testlib +++ b/tests/testlib @@ -12,4 +12,4 @@ [extensions] rebase= EOF -echo "topic=$(echo $(dirname $TESTDIR))/src/topic" >> $HGRCPATH +echo "topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic" >> $HGRCPATH