diff --git a/python_package/LICENSE b/python_package/LICENSE new file mode 120000 index 0000000..ea5b606 --- /dev/null +++ b/python_package/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/python_package/README.md b/python_package/README.md new file mode 120000 index 0000000..32d46ee --- /dev/null +++ b/python_package/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/python_package/pyproject.toml b/python_package/pyproject.toml new file mode 100644 index 0000000..59b4b63 --- /dev/null +++ b/python_package/pyproject.toml @@ -0,0 +1,73 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "trackcpp" +authors = [ { name = "lnls-fac" }, ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email= "alvesb.murilo@gmail.com"} +] +description = "trackcpp python package" +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +license = "MIT" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-fac/trackcpp" +Download = "https://github.com/lnls-fac/trackcpp" +Repository = "https://github.com/lnls-fac/trackcpp.git" +Issues = "https://github.com/lnls-fac/trackcpp/issues" + +# --- Configurações específicas do Setuptools --- +[tool.setuptools] +include-package-data = true + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +trackcpp = ["VERSION", "_trackcpp.so"] + +# --- linter and formatter configurations --- +[tool.ruff] +select = [ + "W", "E", "A", "B", "C90", "D", "I002", "N", "F", "G", "ARG", "S", "NPY"] +ignore = [ + "D203", "D204", "D213", "D215", "D400", "D401", "D404", "D406", "D407", + "D408", "D409", "D413", "E203", "E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401", "F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/python_package/requirements.txt b/python_package/requirements.txt new file mode 100644 index 0000000..fc37fb4 --- /dev/null +++ b/python_package/requirements.txt @@ -0,0 +1 @@ +numpy>=1.8 diff --git a/python_package/setup.py b/python_package/setup.py index a4e96cc..73c8208 100755 --- a/python_package/setup.py +++ b/python_package/setup.py @@ -1,15 +1,28 @@ #!/usr/bin/env python-sirius from setuptools import setup +import pathlib -with open('VERSION','r') as _f: + +def get_abs_path(relative): + return str(pathlib.Path(__file__).parent / relative) + + +with open(get_abs_path("README.md"), "r") as _f: + _long_description = _f.read().strip() + +with open(get_abs_path("VERSION"), "r") as _f: __version__ = _f.read().strip() +with open(get_abs_path("requirements.txt"), "r") as _f: + _requirements = _f.read().strip().split("\n") + setup( name='trackcpp', version=__version__, author='lnls-fac', description='trackcpp python package', + long_description=_long_description, url='https://github.com/lnls-fac/trackcpp', download_url='https://github.com/lnls-fac/trackcpp', classifiers=[ @@ -17,6 +30,7 @@ 'Programming Language :: Python', 'Topic :: Scientific/Engineering' ], + install_requires=_requirements, packages=['trackcpp'], package_data={'trackcpp': ['_trackcpp.so', 'VERSION']}, zip_safe=False diff --git a/python_package/trackcpp/VERSION b/python_package/trackcpp/VERSION index f90ee14..195e81e 100644 --- a/python_package/trackcpp/VERSION +++ b/python_package/trackcpp/VERSION @@ -1 +1 @@ -4.10.7 +4.10.8