diff --git a/firecrown/version.py b/firecrown/version.py index 552e32c2a..cdeb5ef19 100644 --- a/firecrown/version.py +++ b/firecrown/version.py @@ -9,5 +9,5 @@ FIRECROWN_MAJOR = 1 FIRECROWN_MINOR = 6 -FIRECROWN_PATCH = "alpha" +FIRECROWN_PATCH = "0a0" __version__ = f"{FIRECROWN_MAJOR}.{FIRECROWN_MINOR}.{FIRECROWN_PATCH}" diff --git a/setup.cfg b/setup.cfg index 559b57bba..09da03503 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,37 @@ +[metadata] +name = firecrown +version = attr: firecrown.version.__version__ +author = DESCs Firecrown Developers +description = DESC Cosmology Likelihood Framework +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/LSSTDESC/firecrown +license_files = LICENSE + +[options] +include_package_data = True +packages = find: +python_requires = >=3.9 +install_requires = + astropy + cosmosis + cobaya + fitsio + numpy + scipy + numcosmo_py + pandas + pyccl + sacc + yaml + +[options.packages.find] +exclude = + examples* + tests* + tutorial* + docs* + [flake8] max_line_length=88 per-file-ignores = diff --git a/setup.py b/setup.py index 0e15ecb98..177abd0a2 100644 --- a/setup.py +++ b/setup.py @@ -1,41 +1,7 @@ -import os -from setuptools import setup, find_packages -from typing import Optional +"""Setup script for firecrown. +""" +from setuptools import setup -def _munge_req(r): - for sym in ["~", "=", "<", ">", ",", "!", "!"]: - r = r.split(sym)[0] - return r - - -__version__: Optional[str] = None -pth = os.path.join( - os.path.dirname(os.path.realpath(__file__)), "firecrown", "version.py" -) -with open(pth, "r") as fp: - exec(fp.read()) - -pth = os.path.join(os.path.dirname(os.path.realpath(__file__)), "environment.yml") -rqs = [] -with open(pth, "r") as fp: - start = False - for line in fp.readlines(): - if line.strip() == "dependencies:": - start = False - if start: - if "- pip:" in line.strip(): - continue - r = line.strip()[3:].strip() - rqs.append(_munge_req(r)) - -setup( - name="firecrown", - version=__version__, - description="DESC Cosmology Likelihood Framework", - author="DESC Team", - packages=find_packages(), - include_package_data=True, - scripts=[], - install_requires=rqs, -) +if __name__ == "__main__": + setup() diff --git a/tests/test_version.py b/tests/test_version.py index 2606d5eea..3ba94e380 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -7,4 +7,4 @@ def test_version(): - assert firecrown.__version__ == "1.6.alpha" + assert firecrown.__version__ == "1.6.0a0"