-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated setup.py and moved all options and metadata to setup.cfg (#324)
* Updated setup.py and moved all options and metadata to setup.cfg. * Updating alpha version to match PEP 440. * Updated version test. * Add some missing entries to setup.cfg --------- Co-authored-by: Marc Paterno <paterno@fnal.gov>
- Loading branch information
1 parent
e02bba2
commit 7617cea
Showing
4 changed files
with
41 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
|
||
|
||
def test_version(): | ||
assert firecrown.__version__ == "1.6.alpha" | ||
assert firecrown.__version__ == "1.6.0a0" |