diff --git a/f5-openstack-agent-dist/Docker/redhat/7/Dockerfile b/f5-openstack-agent-dist/Docker/redhat/7/Dockerfile index 7ba99e257..1166a41b6 100644 --- a/f5-openstack-agent-dist/Docker/redhat/7/Dockerfile +++ b/f5-openstack-agent-dist/Docker/redhat/7/Dockerfile @@ -1,5 +1,7 @@ FROM centos:7 RUN yum update -y && yum install rpm-build make python-setuptools git -y +RUN curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" +RUN python get-pip.py COPY ./build-rpms.sh / diff --git a/f5-openstack-agent-dist/Docker/ubuntu/14.04/Dockerfile b/f5-openstack-agent-dist/Docker/ubuntu/14.04/Dockerfile index 238bcc9f6..aa9c58488 100644 --- a/f5-openstack-agent-dist/Docker/ubuntu/14.04/Dockerfile +++ b/f5-openstack-agent-dist/Docker/ubuntu/14.04/Dockerfile @@ -5,6 +5,7 @@ RUN apt-get update && apt-get install -y \ python-stdeb \ fakeroot \ python-all \ + python-pip \ git COPY ./build-debs.sh / diff --git a/setup.py b/setup.py index 472a748b5..27140b849 100644 --- a/setup.py +++ b/setup.py @@ -12,36 +12,48 @@ # See the License for the specific language governing permissions and # limitations under the License. -import f5_openstack_agent +import os +import pip import setuptools +import f5_openstack_agent + +cwd = os.getcwd() +try: + install_requirements = [] + reqs_iter = \ + pip.req.parse_requirements('setup_requirements.txt', session='setup') + install_requirements = map(lambda x: str(x.req), reqs_iter) +except pip.exceptions.InstallationError: + if '/tox/' not in cwd or '/.tox/' not in cwd or 'rpm' not in cwd: + raise + setuptools.setup( version=f5_openstack_agent.__version__, name="f5-openstack-agent", - description = ("F5 Networks Agent for OpenStack services"), - license = 'Apache License, Version 2.0', + description=("F5 Networks Agent for OpenStack services"), + license='Apache License, Version 2.0', author="F5 Networks", author_email="f5_openstack_agent@f5.com", - data_files=[('/etc/neutron/services/f5', ['etc/neutron/services/f5/f5-openstack-agent.ini']), + data_files=[('/etc/neutron/services/f5', + ['etc/neutron/services/f5/f5-openstack-agent.ini']), ('/etc/init.d', ['etc/init.d/f5-oslbaasv2-agent']), - ('/usr/lib/systemd/system', ['lib/systemd/system/f5-openstack-agent.service']), + ('/usr/lib/systemd/system', + ['lib/systemd/system/f5-openstack-agent.service']), ('/usr/bin/f5', ['bin/debug_bundler.py'])], - packages=setuptools.find_packages(exclude=['*.test', '*.test.*', 'test*', 'test']), - classifiers=[ - 'Environment :: OpenStack', - 'Intended Audience :: Information Technology', - 'Intended Audience :: System Administrators', - 'License :: OSI Approved :: Apache Software License', - 'Operating System :: POSIX :: Linux', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7' - ], + packages=setuptools.find_packages(exclude=['*.test', '*.test.*', 'test*', + 'test']), + classifiers='''Environment :: OpenStack +Intended Audience :: Information Technology +Intended Audience :: System Administrators +License :: OSI Approved :: Apache Software License +Operating System :: POSIX :: Linux +Programming Language :: Python +Programming Language :: Python :: 2 +Programming Language :: Python :: 2.7'''.split("\n"), entry_points={ 'console_scripts': [ - 'f5-oslbaasv2-agent = f5_openstack_agent.lbaasv2.drivers.bigip.agent:main' - ] - }, - install_requires=['f5-sdk==2.3.3'] + str('f5-oslbaasv2-agent =' + 'f5_openstack_agent.lbaasv2.drivers.bigip.agent:main')]}, + install_requires=install_requirements ) -