Skip to content

Commit

Permalink
Merge "make cfgm-common compatible with pip 20.1"
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey-mp authored and opencontrail-ci-admin committed May 5, 2020
2 parents dd1604d + 50987b0 commit 241b8c3
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/config/api-server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
attrdict
contrail-config-common
contrail-api-client
sandesh==0.1dev
Expand Down
16 changes: 10 additions & 6 deletions src/config/common/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#

try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
import re
from setuptools import setup, find_packages


def requirements(filename):
with open(filename) as f:
lines = f.read().splitlines()
c = re.compile(r'\s*#.*')
return filter(bool, map(lambda y: c.sub('', y).strip(), lines))


setup(
name='contrail-config-common',
description="Contrail VNC Configuration Common Utils",
Expand All @@ -30,8 +34,8 @@
],
packages=find_packages(),
package_data={'': ['*.xml']},
install_requires=[str(req.req) for req in parse_requirements('requirements.txt', session='hack')],
tests_require=[str(req.req) for req in parse_requirements('test-requirements.txt', session='hack')],
install_requires=requirements('requirements.txt'),
tests_require=requirements('test-requirements.txt'),
test_suite='cfgm_common.tests',
keywords='contrail vnc utils',
)
3 changes: 3 additions & 0 deletions src/container/kube-manager/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
recursive-include kube_manager/uve *.html *.xml *.css
recursive-include kube_manager/sandesh *.html *.xml *.css
include requirements.txt
include test-requirements.txt
include tox.ini
17 changes: 13 additions & 4 deletions src/container/kube-manager/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#

import setuptools
import re
from setuptools import setup, find_packages


setuptools.setup(
def requirements(filename):
with open(filename) as f:
lines = f.read().splitlines()
c = re.compile(r'\s*#.*')
return filter(bool, map(lambda y: c.sub('', y).strip(), lines))


setup(
name='kube_manager',
version='0.1dev',
packages=setuptools.find_packages(),
packages=find_packages(),
package_data={'': ['*.html', '*.css', '*.xml', '*.yml']},

# metadata
Expand All @@ -21,7 +29,8 @@

test_suite='kube_manager.tests',

install_requires=['future', 'six'],
install_requires=requirements('requirements.txt'),
tests_require=requirements('test-requirements.txt'),

entry_points = {
# Please update sandesh/common/vns.sandesh on process name change
Expand Down
5 changes: 3 additions & 2 deletions src/container/kube-manager/test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
attrdict
gevent<1.5.0
netaddr>=0.7.5
bitarray>=0.8.0
Expand All @@ -24,6 +25,6 @@ pyaml
keystonemiddleware!=4.19.0
pyOpenSSL
vine==1.1.3
../../config/schema-transformer
../../../noarch/config/svc-monitor
schema-transformer==0.1dev
svc-monitor==0.1dev
pycrypto
1 change: 1 addition & 0 deletions src/container/kube-manager/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ install_command =
--find-links file://{toxinidir}/../../api-lib/dist/ \
--find-links file://{toxinidir}/../../tools/sandesh/library/python/dist/ \
--find-links file://{toxinidir}/../../sandesh/common/dist/ \
--find-links file://{toxinidir}/../../../noarch/config/svc-monitor/dist/ \
--find-links file://{toxinidir}/../../config/api-server/dist/ \
--find-links file://{toxinidir}/../../config/schema-transformer/dist/ {opts} {packages}
whitelist_externals =
Expand Down

0 comments on commit 241b8c3

Please sign in to comment.