aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-09-09 12:19:52 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2017-09-09 12:33:32 +0200
commitd16d4a027afcae16c6920ec69a4cc3a1f2833cb7 (patch)
treea7edd7e767dd5ab0ce2b1f23c09cbaccf693cb2e
parent0c33b0e1c869bc29c0da973dc6c233ef6bcdfc8d (diff)
Leverage on pbr (Python Build Reasonableness)
pbr can inject requirements into the install_requires, tests_require and/or dependency_links arguments to setup. It finishes cleaning the requirements management [1] for all OPNFV projects integrated by Functest. [1] https://wiki.opnfv.org/display/functest/Requirements+management Change-Id: I30b76db8dcaba809e0b314fbd06ae04d24c8baca Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--setup.cfg7
-rw-r--r--setup.py33
2 files changed, 22 insertions, 18 deletions
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..dbe5a37
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,7 @@
+[metadata]
+name = opnfv
+version = 5
+home-page = https://wiki.opnfv.org/display/releng/Releng
+
+[files]
+packages = opnfv
diff --git a/setup.py b/setup.py
index 0dd635f..a1e9b3b 100644
--- a/setup.py
+++ b/setup.py
@@ -1,25 +1,22 @@
-##############################################################################
+#!/usr/bin/env python
+
+# Copyright (c) 2017 Orange and others.
+#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-from setuptools import setup, find_packages
+import setuptools
+# In python < 2.7.4, a lazy loading of package `pbr` will break
+# setuptools if some other modules registered functions in `atexit`.
+# solution from: http://bugs.python.org/issue15881#msg170215
+try:
+ import multiprocessing # noqa
+except ImportError:
+ pass
-setup(
- name="opnfv",
- version="danube",
- packages=find_packages(),
- include_package_data=True,
- package_data={
- },
- url="https://www.opnfv.org",
- install_requires=["paramiko>=2.0",
- "mock>=2.0",
- "requests!=2.12.2,>=2.10.0"],
- test_requires=["nose",
- "coverage>=4.0"]
-)
+setuptools.setup(
+ setup_requires=['pbr>=1.8'],
+ pbr=True)