Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more informations in setup from the __init__ file #74

Merged
merged 6 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libpyvinyl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" :module: Exposes all user facing classes in the common libpyvinyl namespace"""
__author__ = "Carsten Fortmann-Grote, Mads Bertelsen, Juncheng E, Shervin Nourbakhsh"
__email__ = "carsten.grote@xfel.eu"
__email__ = "carsten.grote@xfel.eu, juncheng.e@xfel.eu, Mads.Bertelsen@ess.eu, nourbakhsh@ill.fr"
__version__ = "1.1.1"
__release__ = __version__ + "alpha1"

Expand Down
4 changes: 2 additions & 2 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pint
dill
pint<=0.19.2
dill<=0.3.5.1
scipy
jsons
h5py
Expand Down
16 changes: 9 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,27 @@ def read(rel_path):
return fp.read()


def get_version(rel_path):
def get_from_init(rel_path, field):
for line in read(rel_path).splitlines():
if line.startswith("__version__"):
if line.startswith(field):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
raise RuntimeError("Unable to find " + field + " string.")


initfile = "libpyvinyl/__init__.py"
version = get_from_init(initfile, "__version__")
setup(
name="libpyvinyl",
packages=find_packages(include=["libpyvinyl", "libpyvinyl.*"]),
version=get_version("libpyvinyl/__init__.py"),
version=version,
license="LGPLv3",
description="The python API for photon and neutron simulation codes in the Photon and Neutron Open Science Cloud (PaNOSC).",
author="Carsten Fortmann-Grote, Juncheng E, Mads Bertelsen, Shervin Nourbakhsh",
author_email="carsten.grote@xfel.eu, juncheng.e@xfel.eu, Mads.Bertelsen@ess.eu, nourbakhsh@ill.fr",
author=get_from_init(initfile, "__author__"),
author_email=get_from_init(initfile, "__email__"),
url="https://github.com/PaNOSC-ViNYL/libpyvinyl",
download_url="https://github.com/PaNOSC-ViNYL/libpyvinyl/archive/v1.1.1.tar.gz",
download_url=f"https://github.com/PaNOSC-ViNYL/libpyvinyl/archive/v{version}.tar.gz",
keywords=["photons", "neutrons", "simulations"],
install_requires=requirements,
classifiers=[
Expand Down