declare the namespace with setuptools

Also graft tools so it is included in pypi

Change-Id: I6b7efee4585fc22cedff4da5f54b877f6a936b0e
This commit is contained in:
Jason Kölker 2012-02-09 12:00:43 -06:00
parent c9131594e5
commit 54b6ad3869
3 changed files with 9 additions and 6 deletions

View File

@ -3,3 +3,4 @@ include openstack-common.conf
include README.rst
include tox.ini
include melange/client/views/*.tpl
graft tools

View File

@ -14,7 +14,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)

View File

@ -23,7 +23,7 @@ from melange.client.openstack.common.setup import write_git_changelog
from setuptools.command.sdist import sdist
import setuptools
version = "0.2"
version = "0.2.2"
class local_sdist(sdist):
@ -33,6 +33,7 @@ class local_sdist(sdist):
sdist.run(self)
cmdclass = {'sdist': local_sdist}
install_requires = parse_requirements()
if sys.version_info < (2, 6):
install_requires.append("simplejson")
@ -67,7 +68,7 @@ setuptools.setup(name="python-melangeclient",
author_email="openstack@lists.launchpad.net",
include_package_data=True,
packages=setuptools.find_packages(exclude=["tests"]),
install_requires=parse_requirements(),
install_requires=install_requires,
dependency_links=parse_dependency_links(),
entry_points={"console_scripts": console_scripts},
zip_safe=False,