Skip to content
Snippets Groups Projects
Verified Commit 025c7253 authored by Duncan Macleod's avatar Duncan Macleod
Browse files

setup.cfg: migrate package metadata to cfg file

and add pyproject.toml for PEP-517 builders
parent 6add884f
No related branches found
No related tags found
1 merge request!42Migrate package metadata to setup.cfg file
include LICENSE
include LICENSE README.md
recursive-include config *.conf *.conf.py *.ini *.service
recursive-include debian *
recursive-include tests *
......
[build-system]
requires = [
"setuptools>=42",
"wheel",
]
build-backend = "setuptools.build_meta"
[tool.coverage.run]
source = ["gwdatafind_server"]
[tool.pytest.ini_options]
addopts = "-r a"
filterwarnings = [
"error",
]
; -- build
[metadata]
name = gwdatafind-server
version = attr: gwdatafind_server.__version__
author = Duncan Meacher
author_email = duncan.meacher@ligo.org
license = GPL-3.0-or-later
license_files = LICENSE
description = The server library for the GWDataFind service
long_description = file: README.md
long_description_content_type = text/markdown
url = https://git.ligo.org/computing/gwdatafind/server
classifiers =
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Natural Language :: English
Operating System :: Unix
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Astronomy
Topic :: Scientific/Engineering :: Physics
project_urls =
Bug Tracker = https://git.ligo.org/computing/gwdatafind/server/-/issues
Documentation = https://computing.docs.ligo.org/gwdatafind/server/
Source Code = https://git.ligo.org/computing/gwdatafind/server
[options]
packages = find:
python_version = >=3.6
install_requires =
configobj
flask >= 1.0.0
ligo-segments
scitokens
[options.extras_require]
test =
pytest
docs =
mkdocs
; -- tools
[flake8]
exclude =
......
# -*- coding: utf-8 -*-
# Copyright (2019) Cardiff University
# Copyright (2022) Cardiff University
# Licensed under GPLv3+ - see LICENSE
import re
from pathlib import Path
__author__ = "Duncan Macleod <duncan.macleod@ligo.org>"
from setuptools import (setup, find_packages)
from setuptools import setup
# -- utilities ----------------------------------
def find_version(path):
"""Parse the __version__ metadata in the given file.
"""
with Path(path).open("r") as fp:
version_file = fp.read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
# -- dependencies -------------------------------
install_requires = [
"setuptools",
"flask >= 1.0.0",
"configobj",
"ligo-segments",
"scitokens",
]
# -- setup --------------------------------------
setup(
# metadata
name="gwdatafind-server",
version=find_version(Path("gwdatafind_server") / "__init__.py"),
author="Duncan Macleod",
author_email="duncan.macleod@ligo.org",
description="The server library for the GWDataFind service",
license="GPLv3",
long_description=open("README.md", "r").read(),
long_description_content_type="text/markdown",
url="https://git.ligo.org/gwdatafind/gwdatafind-server",
classifiers=[
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Astronomy",
"Topic :: Scientific/Engineering :: Physics",
],
# dependencies
install_requires=install_requires,
# content
packages=find_packages(),
include_package_data=True,
)
setup()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment