Modernise build of galaxy-test-api package

Also:
- Add missing files to `MANIFEST.in`
This commit is contained in:
Nicola Soranzo
2022-06-10 02:18:12 +01:00
parent 1304e44fe0
commit 701e0112d3
6 changed files with 50 additions and 110 deletions
+1
View File
@@ -1 +1,2 @@
include *.rst *.txt LICENSE
include galaxy_test/api/*.yml
@@ -1,7 +0,0 @@
__version__ = "22.5.0.dev0"
PROJECT_NAME = "galaxy-test-api"
PROJECT_URL = "https://github.com/galaxyproject/galaxy"
PROJECT_AUTHOR = "Galaxy Project and Community"
PROJECT_DESCRIPTION = "Galaxy API Tests"
PROJECT_EMAIL = "galaxy-committers@lists.galaxyproject.org"
+1
View File
@@ -0,0 +1 @@
../package-pyproject.toml
-8
View File
@@ -1,8 +0,0 @@
galaxy-test-base
pytest
python-dateutil
requests
pytest
python-dateutil
requests
tuspy
+48
View File
@@ -0,0 +1,48 @@
[metadata]
author = Galaxy Project and Community
author_email = galaxy-committers@lists.galaxyproject.org
classifiers =
Development Status :: 5 - Production/Stable
Environment :: Console
Intended Audience :: Developers
License :: OSI Approved :: Academic Free License (AFL)
Natural Language :: English
Operating System :: POSIX
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
description = Galaxy API tests
keywords =
Galaxy
license = AFL
license_files =
LICENSE
long_description = file: README.rst, HISTORY.rst
long_description_content_type = text/x-rst
name = galaxy-test-api
url = https://github.com/galaxyproject/galaxy
version = 22.5.0.dev0
[options]
include_package_data = True
install_requires =
galaxy-test-base
pytest
python-dateutil
requests
tuspy
packages = find:
python_requires = >=3.7
[options.extras_require]
driver =
galaxy-test-driver
[options.packages.find]
exclude =
tests*
-95
View File
@@ -1,95 +0,0 @@
#!/usr/bin/env python
import ast
import os
import re
from typing import (
Dict,
List,
)
from setuptools import (
find_packages,
setup,
)
SOURCE_DIR = "galaxy"
project_short_name = os.path.basename(os.path.dirname(os.path.realpath(__file__)))
with open(f"{SOURCE_DIR}/project_galaxy_{project_short_name}.py") as f:
init_contents = f.read()
def get_var(var_name):
pattern = re.compile(rf"{var_name}\s+=\s+(.*)")
match = pattern.search(init_contents)
assert match
return str(ast.literal_eval(match.group(1)))
version = get_var("__version__")
PROJECT_NAME = get_var("PROJECT_NAME")
PROJECT_URL = get_var("PROJECT_URL")
PROJECT_AUTHOR = get_var("PROJECT_AUTHOR")
PROJECT_EMAIL = get_var("PROJECT_EMAIL")
PROJECT_DESCRIPTION = get_var("PROJECT_DESCRIPTION")
PACKAGES = find_packages(where=".", exclude=["tests*"])
ENTRY_POINTS = """
[console_scripts]
"""
PACKAGE_DATA: Dict[str, List[str]] = {
# Be sure to update MANIFEST.in for source dist.
"galaxy": [],
}
PACKAGE_DIR = {
SOURCE_DIR: SOURCE_DIR,
"galaxy_test": "galaxy_test",
}
readme = open("README.rst").read()
history = open("HISTORY.rst").read()
if os.path.exists("requirements.txt"):
requirements = open("requirements.txt").read().split("\n")
else:
# In tox, it will cover them anyway.
requirements = []
setup(
name=PROJECT_NAME,
version=version,
description=PROJECT_DESCRIPTION,
long_description=readme + "\n\n" + history,
long_description_content_type="text/x-rst",
author=PROJECT_AUTHOR,
author_email=PROJECT_EMAIL,
url=PROJECT_URL,
packages=PACKAGES,
entry_points=ENTRY_POINTS,
package_data=PACKAGE_DATA,
package_dir=PACKAGE_DIR,
include_package_data=True,
install_requires=requirements,
extras_require={
"driver": ["galaxy-test-driver"],
},
license="AFL",
zip_safe=False,
keywords="galaxy",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Environment :: Console",
"License :: OSI Approved :: Academic Free License (AFL)",
"Operating System :: POSIX",
"Topic :: Software Development",
"Topic :: Software Development :: Testing",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
)