diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..86909ae --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=43", "wheel"] +build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index b539925..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -pyparsing==2.4.6 diff --git a/pyvalem/__init__.py b/scr/pyvalem/__init__.py similarity index 100% rename from pyvalem/__init__.py rename to scr/pyvalem/__init__.py diff --git a/pyvalem/atom_data.py b/scr/pyvalem/atom_data.py similarity index 100% rename from pyvalem/atom_data.py rename to scr/pyvalem/atom_data.py diff --git a/pyvalem/atomic_configuration.py b/scr/pyvalem/atomic_configuration.py similarity index 100% rename from pyvalem/atomic_configuration.py rename to scr/pyvalem/atomic_configuration.py diff --git a/pyvalem/atomic_term_symbol.py b/scr/pyvalem/atomic_term_symbol.py similarity index 100% rename from pyvalem/atomic_term_symbol.py rename to scr/pyvalem/atomic_term_symbol.py diff --git a/pyvalem/atomic_weights.txt b/scr/pyvalem/atomic_weights.txt similarity index 100% rename from pyvalem/atomic_weights.txt rename to scr/pyvalem/atomic_weights.txt diff --git a/pyvalem/diatomic_molecular_configuration.py b/scr/pyvalem/diatomic_molecular_configuration.py similarity index 100% rename from pyvalem/diatomic_molecular_configuration.py rename to scr/pyvalem/diatomic_molecular_configuration.py diff --git a/pyvalem/formula.py b/scr/pyvalem/formula.py similarity index 100% rename from pyvalem/formula.py rename to scr/pyvalem/formula.py diff --git a/pyvalem/generic_excited_state.py b/scr/pyvalem/generic_excited_state.py similarity index 100% rename from pyvalem/generic_excited_state.py rename to scr/pyvalem/generic_excited_state.py diff --git a/pyvalem/isotope_masses.txt b/scr/pyvalem/isotope_masses.txt similarity index 100% rename from pyvalem/isotope_masses.txt rename to scr/pyvalem/isotope_masses.txt diff --git a/pyvalem/key_value_pair.py b/scr/pyvalem/key_value_pair.py similarity index 100% rename from pyvalem/key_value_pair.py rename to scr/pyvalem/key_value_pair.py diff --git a/pyvalem/molecular_term_symbol.py b/scr/pyvalem/molecular_term_symbol.py similarity index 100% rename from pyvalem/molecular_term_symbol.py rename to scr/pyvalem/molecular_term_symbol.py diff --git a/pyvalem/racah_symbol.py b/scr/pyvalem/racah_symbol.py similarity index 100% rename from pyvalem/racah_symbol.py rename to scr/pyvalem/racah_symbol.py diff --git a/pyvalem/reaction.py b/scr/pyvalem/reaction.py similarity index 100% rename from pyvalem/reaction.py rename to scr/pyvalem/reaction.py diff --git a/pyvalem/rotational_state.py b/scr/pyvalem/rotational_state.py similarity index 100% rename from pyvalem/rotational_state.py rename to scr/pyvalem/rotational_state.py diff --git a/pyvalem/special_cases.py b/scr/pyvalem/special_cases.py similarity index 100% rename from pyvalem/special_cases.py rename to scr/pyvalem/special_cases.py diff --git a/pyvalem/state.py b/scr/pyvalem/state.py similarity index 100% rename from pyvalem/state.py rename to scr/pyvalem/state.py diff --git a/pyvalem/state_parser.py b/scr/pyvalem/state_parser.py similarity index 100% rename from pyvalem/state_parser.py rename to scr/pyvalem/state_parser.py diff --git a/pyvalem/stateful_species.py b/scr/pyvalem/stateful_species.py similarity index 100% rename from pyvalem/stateful_species.py rename to scr/pyvalem/stateful_species.py diff --git a/pyvalem/utils.py b/scr/pyvalem/utils.py similarity index 100% rename from pyvalem/utils.py rename to scr/pyvalem/utils.py diff --git a/pyvalem/vibrational_state.py b/scr/pyvalem/vibrational_state.py similarity index 100% rename from pyvalem/vibrational_state.py rename to scr/pyvalem/vibrational_state.py diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..41cf804 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,3 @@ +[metadata] +# This includes the license file(s) in the wheel (requires setuptools>=42) +license_files = LICENSE \ No newline at end of file diff --git a/setup.py b/setup.py index d440d97..12c06f4 100644 --- a/setup.py +++ b/setup.py @@ -1,36 +1,51 @@ -import os from setuptools import setup, find_packages +from pathlib import Path -long_description = """PyValem is a Python package for parsing, validating, manipulating and interpreting the chemical formulas, quantum states and labels of atoms, ions and small molecules. +root = Path(__file__).parent.resolve() -Species and states are specfied as strings using a simple and flexible syntax, and may be compared, output in different formats and manipulated using a variety of predefined Python methods. - -See https://github.com/xnx/pyvalem for documentation and more information. -""" - -# Read in dependencies list from requirements.txt -thelibFolder = os.path.dirname(os.path.realpath(__file__)) -requirementPath = thelibFolder + '/requirements.txt' -install_requires = [] -if os.path.isfile(requirementPath): - with open(requirementPath) as f: - install_requires = f.read().splitlines() +# Get the long description from the README file +long_description = (root / "README.rst").read_text(encoding="utf-8") setup( - name = 'pyvalem', - version = '2.3.0', - author = 'Christian Hill, Martin Hanicinec', - author_email = 'ch.hill@iaea.org', - description = 'A package for managing simple chemical species and states', + name='pyvalem', + version='2.4.0', + description='A package for managing simple chemical species and states', long_description=long_description, - long_description_content_type="text/markdown", - url = 'https://github.com/xnx/pyvalem', - packages = find_packages(), - install_requires=install_requires, + long_description_content_type="text/x-rst", + url='https://github.com/xnx/pyvalem', + author='Christian Hill', + author_email='ch.hill@iaea.org', classifiers=[ - "Programming Language :: Python :: 3", + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering :: Chemistry", + "Topic :: Scientific/Engineering :: Physics", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "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", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3 :: Only", + "Operating System :: OS Independent", ], + keywords="chemistry, formula, species, state, reaction", + package_dir={'': 'src'}, + packages=find_packages(where='src'), python_requires='>=3.4', + install_requires=[ + "pyparsing", + 'importlib-resources; python_version < "3.7.0"' + ], + extras_require={ + 'dev': ["check-manifest", "black", "coverage", "pytest", "ipython"] + }, package_data={'pyvalem': ['atomic_weights.txt', 'isotope_masses.txt']}, + project_urls={ + "Bug Reports": "https://github.com/xnx/pyvalem/issues", + }, ) diff --git a/test/__init__.py b/test/__init__.py deleted file mode 100644 index e69de29..0000000