| |
@@ -1,50 +1,15 @@
|
| |
- import os
|
| |
- import sys
|
| |
- from setuptools import setup, find_packages
|
| |
- from setuptools.command.test import test as TestCommand
|
| |
+ from os import path
|
| |
+ from setuptools import setup
|
| |
|
| |
+ HERE = path.abspath(path.dirname(__file__))
|
| |
|
| |
- class PyTest(TestCommand):
|
| |
- user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
|
| |
-
|
| |
- def initialize_options(self):
|
| |
- TestCommand.initialize_options(self)
|
| |
- self.pytest_args = ''
|
| |
- self.test_suite = 'tests'
|
| |
-
|
| |
- def run_tests(self):
|
| |
- #import here, cause outside the eggs aren't loaded
|
| |
- import pytest
|
| |
- errno = pytest.main(self.pytest_args.split())
|
| |
- sys.exit(errno)
|
| |
-
|
| |
- # Utility function to read the README file.
|
| |
- # Used for the long_description. It's nice, because now 1) we have a top level
|
| |
- # README file and 2) it's easier to type in the README file than to put a raw
|
| |
- # string in below. Stolen from
|
| |
- # https://pythonhosted.org/an_example_pypi_project/setuptools.html
|
| |
- def read(fname):
|
| |
- return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
| |
-
|
| |
- # this is sloppy and wrong, see https://stackoverflow.com/a/4792601
|
| |
- # discussion, but should be okay for our purposes. the problem here
|
| |
- # is that if you run 'python3 setup.py install' with all the install
|
| |
- # requires in place, setuptools installs scripts from several of the
|
| |
- # deps to /usr/local/bin , overriding the system copies in /usr/bin.
|
| |
- # This seems to happen when the copy in /usr/bin is for Python 2 not
|
| |
- # Python 3 - e.g. because /usr/bin/fedmsg-logger is Python 2, if you
|
| |
- # do 'python3 setup.py install' here, due to the fedmsg dep, you get
|
| |
- # a /usr/local/bin/fedmsg-logger which is Python 3...we want to be
|
| |
- # able to avoid this, so hack up a 'no deps'
|
| |
- if "--nodeps" in sys.argv:
|
| |
- INSTALLREQS = []
|
| |
- sys.argv.remove("--nodeps")
|
| |
- else:
|
| |
- INSTALLREQS = open('install.requires').read().splitlines()
|
| |
+ # Get the long description from the README file
|
| |
+ with open(path.join(HERE, 'README.md'), encoding='utf-8') as f:
|
| |
+ LONGDESC = f.read()
|
| |
|
| |
setup(
|
| |
name="fedora_openqa",
|
| |
- version="3.0.0",
|
| |
+ version="3.1.0",
|
| |
entry_points={
|
| |
'console_scripts': [
|
| |
'fedora-openqa = fedora_openqa.cli:main',
|
| |
@@ -57,10 +22,11 @@
|
| |
keywords="fedora openqa test qa",
|
| |
url="https://pagure.io/fedora-qa/fedora_openqa",
|
| |
packages=["fedora_openqa"],
|
| |
- install_requires=INSTALLREQS,
|
| |
- tests_require=open('tests.requires').read().splitlines(),
|
| |
- cmdclass={'test': PyTest},
|
| |
- long_description=read('README.md'),
|
| |
+ package_dir={"": "src"},
|
| |
+ install_requires=open('install.requires').read().splitlines(),
|
| |
+ python_requires="!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4",
|
| |
+ long_description=LONGDESC,
|
| |
+ long_description_content_type='text/markdown',
|
| |
classifiers=[
|
| |
"Development Status :: 5 - Production/Stable",
|
| |
"Topic :: Utilities",
|
| |
This PR contains various modernizations to the project layout, setup.py, CI config etc. to try and adopt current best practices for Python projects and drop some old clunky bits we don't need any more.