Пример #1
0
 def _get_version_from_pkg_resources(self):
     """Get the version of the package from the pkg_resources record
     associated with the package."""
     try:
         requirement = pkg_resources.Requirement.parse(self.package)
         provider = pkg_resources.get_provider(requirement)
         return provider.version
     except pkg_resources.DistributionNotFound:
         # The most likely cause for this is running tests in a tree
         # produced from a tarball where the package itself has not been
         # installed into anything. Revert to setup-time logic.
         from manilaclient.openstack.common import setup
         return setup.get_version(self.package)
Пример #2
0
from manilaclient.openstack.common import setup

requires = setup.parse_requirements()
depend_links = setup.parse_dependency_links()
tests_require = setup.parse_requirements(["tools/test-requires"])
project = "python-manilaclient"


def read_file(file_name):
    return open(os.path.join(os.path.dirname(__file__), file_name)).read()


setuptools.setup(
    name=project,
    version=setup.get_version(project),
    author="OpenStack Contributors",
    author_email="*****@*****.**",
    description="Client library for OpenStack Manila API.",
    long_description=read_file("README.rst"),
    license="Apache License, Version 2.0",
    url="https://github.com/openstack/python-manilaclient",
    packages=setuptools.find_packages(exclude=["tests", "tests.*"]),
    cmdclass=setup.get_cmdclass(),
    install_requires=requires,
    tests_require=tests_require,
    setup_requires=["setuptools-git>=0.4"],
    include_package_data=True,
    dependency_links=depend_links,
    classifiers=[
        "Development Status :: 5 - Production/Stable",
Пример #3
0
from manilaclient.openstack.common import setup

requires = setup.parse_requirements()
depend_links = setup.parse_dependency_links()
tests_require = setup.parse_requirements(['tools/test-requires'])
project = 'python-manilaclient'


def read_file(file_name):
    return open(os.path.join(os.path.dirname(__file__), file_name)).read()


setuptools.setup(
    name=project,
    version=setup.get_version(project),
    author="OpenStack Contributors",
    author_email="*****@*****.**",
    description="Client library for OpenStack Manila API.",
    long_description=read_file("README.rst"),
    license="Apache License, Version 2.0",
    url="https://github.com/openstack/python-manilaclient",
    packages=setuptools.find_packages(exclude=['tests', 'tests.*']),
    cmdclass=setup.get_cmdclass(),
    install_requires=requires,
    tests_require=tests_require,
    setup_requires=['setuptools-git>=0.4'],
    include_package_data=True,
    dependency_links=depend_links,
    classifiers=[
        "Development Status :: 5 - Production/Stable",