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

Commit

Permalink
Improve packaging by using PBR
Browse files Browse the repository at this point in the history
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 <hberaud@redhat.com>
  • Loading branch information
4383 committed Mar 28, 2019
1 parent 4c9cdda commit dc81f6c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 41 deletions.
46 changes: 46 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[metadata]
name = pypodman
home-page = https://github.com/containers/python-pypodman
project_urls =
Bug Tracker = https://github.com/containers/python-pypodman/issues
Source Code = https://github.com/containers/python-pypodman
summary = A client for communicating with a Podman server
description-file =
README.md
author = Jhon Honce
author-email = jhonce@redhat.com
license = Apache Software License
classifier =
Development Status :: 3 - Alpha
Intended Audience :: Developers
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Operating System :: MacOS :: MacOS X
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Programming Language :: Python :: 3.4
Topic :: System :: Systems Administration
Topic :: Utilities
keywords =
varlink
libpod
podman
pypodman

[files]
packages =
pypodman

[extras]
devel=
fixtures
pbr
tox
bandit

[entry_points]
console_scripts =
pypodman = pypodman.main:main

[wheel]
universal = 1
46 changes: 5 additions & 41 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,45 +1,9 @@
#!/usr/bin/env python

import os

from setuptools import find_packages, setup

root = os.path.abspath(os.path.dirname(__file__))

with open(os.path.join(root, 'README.md')) as me:
readme = me.read()

with open(os.path.join(root, 'requirements.txt')) as r:
requirements = r.read().splitlines()

from setuptools import setup

setup(
name='pypodman',
version=os.environ.get('PODMAN_VERSION', '0.0.0'),
description='A client for communicating with a Podman server',
author_email='jhonce@redhat.com',
author='Jhon Honce',
license='Apache Software License',
long_description=readme,
entry_points={'console_scripts': [
'pypodman = pypodman.main:main',
]},
include_package_data=True,
install_requires=requirements,
packages=find_packages(exclude=['test']),
python_requires='>=3',
zip_safe=True,
url='http://github.com/containers/libpod',
keywords='varlink libpod podman pypodman',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python :: 3.4',
'Topic :: System :: Systems Administration',
'Topic :: Utilities',
])
setup_requires=['pbr'],
pbr=True,
long_description_content_type="text/markdown",
)

0 comments on commit dc81f6c

Please sign in to comment.