mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-10-28 16:52:26 +00:00
Convert to pbr setup
It turns out that our current setup does not really support the `sdist`
Python packaging step. I'm trying to increase automation, both for
making releases for upload to pypi.org, and also for CI via Zuul. As it
turns out, Zuul comes with a set of predefined jobs which -- by default
-- use `tox`, and tox was having troubles dealing with our `setup.py`
because it also assumes that the `sdist` step works. It is also supposed
to:
- fix version number duplication in `setup.py`,
- fix version number duplication in Sphinx docs,
- prevent the need to write a `MANIFEST.in` manually.
TL;DR: insetad of having to deal with a ton of other creative
boilerplate, use tools for lazy people like me, and PBR ("Python Build
Reasonableness") appears to check the marks here.
Change-Id: I27c36c4f6b0e76857d16f7819ec237e9b811476a
This commit is contained in:
13
docs/conf.py
13
docs/conf.py
@@ -32,7 +32,9 @@ sys.path.insert(0, os.path.abspath('../'))
|
||||
# ones.
|
||||
extensions = ['sphinx.ext.autodoc',
|
||||
'sphinx.ext.mathjax',
|
||||
'sphinx.ext.githubpages','sphinxcontrib.bibtex']
|
||||
'sphinx.ext.githubpages',
|
||||
'sphinxcontrib.bibtex',
|
||||
'pbr.sphinxext',]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
@@ -51,15 +53,6 @@ project = 'gnpy'
|
||||
copyright = '2018, Telecom InfraProject - OOPT PSE Group'
|
||||
author = 'Telecom InfraProject - OOPT PSE Group'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.1'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.1'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#
|
||||
|
||||
@@ -4,6 +4,7 @@ matplotlib>=3.1.0,<4
|
||||
networkx>=2.3,<3
|
||||
numpy>=1.16.1,<2
|
||||
pandas==0.24.2
|
||||
pbr>=5.4.4,<6
|
||||
Pygments>=2.4.2,<3
|
||||
pytest>=4.0.0,<5
|
||||
scipy>=1.3.0,<2
|
||||
|
||||
44
setup.cfg
Normal file
44
setup.cfg
Normal file
@@ -0,0 +1,44 @@
|
||||
[metadata]
|
||||
name = gnpy
|
||||
description = Route planning and optimization tool for mesh optical networks
|
||||
description-file = README.rst
|
||||
description-content-type = text/x-rst; charset=UTF-8
|
||||
author = Telecom Infra Project
|
||||
author-email = jan.kundrat@telecominfraproject.com
|
||||
license = BSD-3-Clause
|
||||
home-page = https://github.com/Telecominfraproject/oopt-gnpy
|
||||
project_urls =
|
||||
Bug Tracker = https://github.com/Telecominfraproject/oopt-gnpy/issues
|
||||
Documentation = https://gnpy.readthedocs.io/
|
||||
python-requires = >=3.6
|
||||
classifier =
|
||||
Development Status :: 3 - Alpha
|
||||
Intended Audience :: Developers
|
||||
Intended Audience :: Science/Research
|
||||
Intended Audience :: Telecommunications Industry
|
||||
License :: OSI Approved :: BSD License
|
||||
Natural Language :: English
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 3 :: Only
|
||||
Programming Language :: Python :: 3.6
|
||||
Programming Language :: Python :: Implementation :: CPython
|
||||
Topic :: Scientific/Engineering
|
||||
Topic :: Scientific/Engineering :: Physics
|
||||
keywords =
|
||||
optics
|
||||
network
|
||||
fiber
|
||||
communication
|
||||
route
|
||||
planning
|
||||
optimization
|
||||
|
||||
[pbr]
|
||||
warnerrors = True
|
||||
|
||||
[files]
|
||||
packages = gnpy
|
||||
data_files =
|
||||
examples = examples/*
|
||||
# FIXME: solve example data files
|
||||
# FIXME: add example scripts ("entry points")
|
||||
38
setup.py
38
setup.py
@@ -1,39 +1,5 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
from codecs import open
|
||||
from os import path
|
||||
from setuptools import setup, find_packages
|
||||
import setuptools
|
||||
|
||||
here = path.abspath(path.dirname(__file__))
|
||||
|
||||
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
|
||||
long_description = f.read()
|
||||
|
||||
setup(
|
||||
name='gnpy',
|
||||
version='2.1',
|
||||
description='route planning and optimization tool for mesh optical networks',
|
||||
long_description=long_description,
|
||||
long_description_content_type='text/x-rst; charset=UTF-8',
|
||||
url='https://github.com/Telecominfraproject/gnpy',
|
||||
author='Telecom Infra Project',
|
||||
author_email='jan.kundrat@telecominfraproject.com',
|
||||
classifiers=[
|
||||
'Development Status :: 3 - Alpha',
|
||||
'Intended Audience :: Developers',
|
||||
'Intended Audience :: Science/Research',
|
||||
'Intended Audience :: Telecommunications Industry',
|
||||
'License :: OSI Approved :: BSD License',
|
||||
'Natural Language :: English',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 3 :: Only',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: Implementation :: CPython',
|
||||
'Topic :: Scientific/Engineering',
|
||||
'Topic :: Scientific/Engineering :: Physics',
|
||||
],
|
||||
keywords='optics network fiber communication route planning optimization',
|
||||
#packages=find_packages(exclude=['examples', 'docs', 'tests']), # Required
|
||||
packages=find_packages(exclude=['docs', 'tests']), # Required
|
||||
install_requires=list(open('requirements.txt'))
|
||||
)
|
||||
setuptools.setup(setup_requires=['pbr'], pbr=True)
|
||||
|
||||
Reference in New Issue
Block a user