Remove requirement of pbr.

* Use setuptools instead in order to support RHEL 8 beta where pbr is
   not included.
 * The MANIFEST.in file is for including 'requirements.txt' in
   output of `python setup.py sdisk` command.

Signed-off-by: Gris Ge <fge@redhat.com>
This commit is contained in:
Gris Ge 2018-11-26 23:40:11 +08:00
parent b30268994b
commit c87bdecefc
3 changed files with 36 additions and 19 deletions

1
MANIFEST.in Normal file
View File

@ -0,0 +1 @@
include requirements.txt

View File

@ -1,17 +0,0 @@
[metadata]
name = nmstate
author = Red Hat
summary = nmstate
license = GNU GPLv2
description-file = README.md
long-description-content-type = text/markdown
url=https://nmstate.github.io/
[files]
packages =
libnmstate
nmstatectl
[entry_points]
console_scripts =
nmstatectl = nmstatectl.nmstatectl:main

View File

@ -1,3 +1,36 @@
import setuptools
from setuptools import setup, find_packages
setuptools.setup(setup_requires=['pbr'], pbr=True)
def readme():
with open('README.md') as f:
return f.read()
def requirements():
req = []
with open('requirements.txt') as f:
for l in f:
l.strip()
if not l.startswith('#'):
req.append(l)
return req
setup(
name='nmstate',
version='0.0.2',
description='Declarative network manager API',
author="Edward Haas",
author_email="ehaas@redhat.com",
long_description=readme(),
url='https://nmstate.github.io/',
license='GPLv2+',
packages=find_packages(),
install_requires=requirements(),
entry_points={
'console_scripts': ['nmstatectl = nmstatectl.nmstatectl:main'],
},
package_data={
'libnmstate': ['schemas/operational-state.yaml']
},
)