From 57bf9556c7e902b2a2097e0cde587fc0079018ad Mon Sep 17 00:00:00 2001 From: gryf Date: Mon, 28 Oct 2019 19:13:04 +0100 Subject: [PATCH] Added python package setup and tox --- setup.cfg | 22 ++++++++++++++++++++++ setup.py | 40 ++++++++++++++++++++++++++++++++++++++++ tox.ini | 21 +++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 tox.ini diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..fa4fed2 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,22 @@ +[bumpversion] +current_version = 0.1.0 +commit = True +tag = True + +[bumpversion:file:setup.py] +search = version='{current_version}' +replace = version='{new_version}' + +[bumpversion:file:ferrit/__init__.py] +search = __version__ = '{current_version}' +replace = __version__ = '{new_version}' + +[bdist_wheel] +universal = 1 + +[flake8] +exclude = docs + +[aliases] +# Define setup.py command aliases here + diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..be3210f --- /dev/null +++ b/setup.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python +"""The setup script.""" + +from setuptools import setup, find_packages + + +with open('README.rst') as readme_file: + readme = readme_file.read() + + +requirements = ['paramiko', 'bottle'] + + +setup(author="Roman Dobosz, Szymon Datko", + author_email='gryf73@gmail.com', + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, ' + '!=3.5.*', + classifiers=['Development Status :: 2 - Pre-Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: BSD License', + 'Natural Language :: English', + "Programming Language :: Python :: 2", + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8'], + description="Ferrit is a fake gerrit server for testing purposes", + entry_points={'console_scripts': ['ferrit=ferrit.cli:main']}, + install_requires=requirements, + license="BSD license", + long_description=readme, + include_package_data=True, + keywords='ferrit', + name='ferrit', + packages=find_packages(include=['ferrit', 'ferrit.*']), + test_suite='tests', + url='https://github.com/gryf/ferrit', + version='0.0.1', + zip_safe=False) diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..04e508a --- /dev/null +++ b/tox.ini @@ -0,0 +1,21 @@ +[tox] +envlist = py27, py35, py36, py37, py38, flake8 + +[travis] +python = + 3.8: py38 + 3.7: py37 + 3.6: py36 + 3.5: py35 + 2.7: py27 + +[testenv:flake8] +basepython = python +deps = flake8 +commands = flake8 ferrit + +[testenv] +setenv = + PYTHONPATH = {toxinidir} + +commands = python setup.py test