Skip to content

Commit

Permalink
Improve packaging
Browse files Browse the repository at this point in the history
- display readme.md content on pypi
- retrieve version from scm (git tag in our case)
- automatically deploy a new release on pypi when we push a git tag on github
- prefer cfg file to host project package config instead of python code
  • Loading branch information
4383 authored and haraldh committed Aug 13, 2019
1 parent 511a468 commit ced9b8e
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@
/.cache
/.coverage
/.pytest_cache

*.eggs/
*__pycache__*
dist/
*.swa
*.swp
build/
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ install:
- pip install tox-travis .[devel]
- pip install -r test-requirements.txt
script:
# Check packaging first (README format etc...)
- pip install -U setuptools
- pip install -U wheel
- pip install -U twine
- python setup.py sdist
- python setup.py bdist_wheel
- twine check dist/*
- tox
- "python -m varlink.cli -A 'python -m varlink.tests.test_orgexamplemore --varlink=$VARLINK_ADDRESS' call org.example.more.Ping '{ \"ping\": \"Ping\" }'"
- PYTHONPATH=$(pwd) python ./varlink/tests/test_certification.py
Expand All @@ -29,3 +36,11 @@ notifications:
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always

deploy:
- provider: pypi
user: varlink
password: your-secure-password
on:
tags: true
distributions: sdist bdist_wheel
skip_existing: true
36 changes: 36 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[metadata]
name = varlink
description = Python implementation of the Varlink protoco
long_description = file: README.md
long_description_content_type = text/markdown
author = Lars Karlitski<lars@karlitski.net>, Harald Hoyer<harald@redhat.com>
author_email = harald@redhat.com
url = https://github.com/varlink/python
keywords = ipc, varlink, rpc
license = ASL 2.0
classifiers =
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
Programming Language :: Python
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Topic :: System :: Networking

[options]
zip_safe = False
python_requires=>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
include_package_data = True
packages = varlink
setup_requires =
setuptools_scm

[options.package_data]
varlink = *.varlink

[bdist_wheel]
universal = 1

0 comments on commit ced9b8e

Please sign in to comment.