From 9221f0b9cf460028617cd454d5e9f73cdb81c490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADnez=20Garrido?= Date: Fri, 15 Jul 2022 17:26:09 +0200 Subject: [PATCH] Migrate from setup.py to pyproject.toml --- pyproject.toml | 62 +++++++++++++++++++++++++++++++++++ setup.py | 88 -------------------------------------------------- 2 files changed, 62 insertions(+), 88 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..fd7396b5cd --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,62 @@ +[build-system] +requires = ["flit_core >=3.2,<4"] +build-backend = "flit_core.buildapi" + +[project] +# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections +name = "ansys-dpf-core" +version = "0.4.dev0" +description = "Data Processing Framework - Python Core " +readme = "README.md" +requires-python = ">=3.7" +license = {file = "LICENSE"} +authors = [ + {name = "ANSYS, Inc.", email = "pyansys.support@ansys.com"}, +] +maintainers = [ + {name = "PyAnsys developers", email = "pyansys.maintainers@ansys.com"}, +] + +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] +dependencies = [ + "ansys-grpc-dpf>=0.2.3", + "importlib-metadata >=4.0", + "numpy", + "progressbar2", + "protobuf<=3.20.1", + "psutil", +] + +[project.optional-dependencies] +plottig = ["pyvista>=0.32.0", "matplotlib>=3.2"] +reporting = ["scooby"] + +[tool.flit.module] +name = "ansys.dpf.core" + +[project.urls] +Homepage = "https://dpfdocs.pyansys.com/" +Documentation = "https://dpfdocs.pyansys.com/" +Source = "https://github.com/pyansys/pydpf-core" +Tracker = "https://github.com/pyansys/pydpf-core/issues" + +[tool.black] +line-length = 100 + +[tool.isort] +profile = "black" +force_sort_within_sections = true +line_length = 100 +default_section = "THIRDPARTY" +src_paths = ["docs", "src", "tests"] + +[tool.coverage.run] +source = ["ansys.dpf"] + +[tool.coverage.report] +show_missing = true diff --git a/setup.py b/setup.py deleted file mode 100644 index 6f71c00a6e..0000000000 --- a/setup.py +++ /dev/null @@ -1,88 +0,0 @@ -"""Installation file for python dpf module -""" -import os -from io import open as io_open - -from setuptools import setup - -install_requires = ["psutil", "progressbar2", "numpy", "ansys.grpc.dpf>=0.2.3", "protobuf<=3.20.1"] - -# Get version from version info -filepath = os.path.dirname(__file__) -__version__ = None -version_file = os.path.join(filepath, "ansys", "dpf", "core", "_version.py") -with io_open(version_file, mode="r") as fd: - exec(fd.read()) # execute file from raw string - -readme_file = os.path.join(filepath, "README.md") - -setup( - name="ansys-dpf-core", - packages=[ - "ansys.dpf.core", - "ansys.dpf.core.examples", - "ansys.dpf.core.operators", - "ansys.dpf.core.operators.averaging", - "ansys.dpf.core.operators.filter", - "ansys.dpf.core.operators.geo", - "ansys.dpf.core.operators.invariant", - "ansys.dpf.core.operators.logic", - "ansys.dpf.core.operators.mapping", - "ansys.dpf.core.operators.math", - "ansys.dpf.core.operators.mesh", - "ansys.dpf.core.operators.metadata", - "ansys.dpf.core.operators.min_max", - "ansys.dpf.core.operators.result", - "ansys.dpf.core.operators.scoping", - "ansys.dpf.core.operators.serialization", - "ansys.dpf.core.operators.utility", - ], - version=__version__, - description="DPF Python gRPC client", - long_description=open("README.md").read(), - long_description_content_type="text/markdown", - classifiers=[ - "Development Status :: 4 - Beta", - "Intended Audience :: Science/Research", - "Topic :: Scientific/Engineering :: Information Analysis", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "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", - ], - package_data={ - "ansys.dpf.core.examples": [ - "ASimpleBar.rst", - "static.rst", - "complex.rst", - "model_with_ns.rst", - "file_cyclic.rst", - "msup_transient_plate1.rst", - "rth/rth_electric.rth", - "rth/rth_steady.rth", - "rth/rth_transient.rth", - "sub/cp56.sub", - "msup/file.mode", - "msup/file.rst", - "msup/file.rfrq", - "msup_distributed/file0.rst", - "msup_distributed/file1.rst", - "msup_distributed/file0.mode", - "msup_distributed/file1.mode", - "msup_distributed/file_load_1.rfrq", - "msup_distributed/file_load_2.rfrq", - ] - }, - maintainer_email="pyansys.maintainers@ansys.com", - python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", - install_requires=install_requires, - extras_require={ - "plotting": ["pyvista>=0.32.0", "matplotlib>=3.2"], - "reporting": ["scooby"], - }, - url="https://github.com/pyansys/pydpf-core", - license='MIT', -)