Skip to content
This repository was archived by the owner on Feb 10, 2021. It is now read-only.

Commit d1cc16a

Browse files
committed
Improve packaging by using PBR
PBR (Python Build Reasonableness)[1]. Overview: - remove python code - introduce meta project configuration - allow pypi to display readme at markdown format - automatize semver management based on git tag name (example 1.0.0) - automatize changelog generate - automatize authors file generate PBR allow to automatically manage your version bumping, your changelog, your authors file and a lot of useful features like this. You just have to publish a git tag and pbr generate a version number based on the git tag name (example: 1.0.0). It also a good practice to use setup.cfg to centralize project configuration: - project meta - wheel - etc... This commit remove python code to maintain by transform it into configuration. If you choose to distribute this project with pypi these changes introduce readme displayed at markdown format compatible with pypi. [1] https://docs.openstack.org/pbr/latest/ Signed-off-by: Hervé Beraud <[email protected]>
1 parent bde015f commit d1cc16a

File tree

2 files changed

+40
-34
lines changed

2 files changed

+40
-34
lines changed

setup.cfg

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[metadata]
2+
name = podman
3+
home-page = https://github.com/containers/python-podman
4+
project_urls =
5+
Bug Tracker = https://github.com/containers/python-podman/issues
6+
Source Code = https://github.com/containers/python-podman
7+
summary = A library to interact with a Podman server
8+
description-file =
9+
README.md
10+
author = Jhon Honce
11+
author-email = [email protected]
12+
license = Apache Software License
13+
classifier =
14+
Development Status :: 3 - Alpha
15+
Intended Audience :: Developers
16+
License :: OSI Approved :: Apache Software License
17+
Programming Language :: Python :: 3.4
18+
Topic :: Software Development
19+
keywords =
20+
varlink
21+
libpod
22+
podman
23+
24+
[files]
25+
packages =
26+
podman
27+
28+
[extras]
29+
devel=
30+
fixtures
31+
pbr
32+
tox
33+
bandit
34+
35+
[wheel]
36+
universal = 1

setup.py

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,9 @@
11
#!/usr/bin/env python
22

3-
import os
4-
5-
from setuptools import find_packages, setup
6-
7-
8-
root = os.path.abspath(os.path.dirname(__file__))
9-
10-
with open(os.path.join(root, 'README.md')) as me:
11-
readme = me.read()
12-
13-
with open(os.path.join(root, 'requirements.txt')) as r:
14-
requirements = r.read().splitlines()
15-
3+
from setuptools import setup
164

175
setup(
18-
name='podman',
19-
version=os.environ.get('PODMAN_VERSION', '0.0.0'),
20-
description='A library for communicating with a Podman server',
21-
author='Jhon Honce',
22-
author_email='[email protected]',
23-
license='Apache Software License',
24-
long_description=readme,
6+
setup_requires=['pbr'],
7+
pbr=True,
258
long_description_content_type="text/markdown",
26-
include_package_data=True,
27-
install_requires=requirements,
28-
packages=find_packages(exclude=['test']),
29-
python_requires='>=3',
30-
zip_safe=True,
31-
url='http://github.com/containers/libpod',
32-
keywords='varlink libpod podman',
33-
classifiers=[
34-
'Development Status :: 3 - Alpha',
35-
'Intended Audience :: Developers',
36-
'License :: OSI Approved :: Apache Software License',
37-
'Programming Language :: Python :: 3.4',
38-
'Topic :: Software Development',
39-
])
9+
)

0 commit comments

Comments
 (0)