diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..955c9a9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,32 @@ +[build-system] +requires = ["setuptools", "setuptools-scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "random_events" +authors = [ + { name="Tom Schierenbeck", email="tom_sch@uni-bremen.de" }, +] +description = "Random random events for probabilistic reasoning" +readme = "README.md" +requires-python = ">=3.6" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] +keywords=["random events", "probabilistic machine learning", "probability theory", "variables", + "reasoning under uncertainty"] +dynamic = ["version"] + +[project.urls] +"Source" = 'https://github.com/tomsch420/random-events' +"Bug Tracker" = 'https://github.com/tomsch420/random-events/issues' + +[tool.setuptools.packages.find] +where = ["src"] # list of folders that contain the packages (["."] by default) +include = ["random_events*"] + +[tool.setuptools.dynamic] +version = {attr = "random_events.__version__"} +dependencies = {file = "requirements.txt"} \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index f71c47e..0000000 --- a/setup.py +++ /dev/null @@ -1,40 +0,0 @@ -import codecs -import os - -from setuptools import setup - -long_description = """Probabilistic Machine Learning frequently requires descriptions of random variables and events -that are shared among many packages.This package provides a common interface for describing random variables and events, - providing usable and easily extensible classes.""" - - -def read(rel_path): - here = os.path.abspath(os.path.dirname(__file__)) - with codecs.open(os.path.join(here, rel_path), 'r') as fp: - return fp.read() - - -def get_version(rel_path): - for line in read(rel_path).splitlines(): - if line.startswith('__version__'): - delim = '"' if '"' in line else "'" - return line.split(delim)[1] - else: - raise RuntimeError("Unable to find version string.") - - -setup(name='random_events', - version=get_version(os.path.join("src", "random_events", "__init__.py")), - description='Define random events for probabilistic reasoning', - long_description=long_description, - long_description_content_type='text/plain', - author='Tom Schierenbeck', - author_email='tom_sch@uni-bremen.de', - url='https://github.com/tomsch420/random-events', - packages=['random_events'], - install_requires=["setuptools", "portion", "pydantic"], - keywords='random events probabilistic machine learning probability theory variables', - project_urls={'Source': 'https://github.com/tomsch420/random-events', - 'Documentation': 'TODO'}, - python_requires='>=3.6', - package_dir={'': 'src'}, )