diff --git a/documentation/Install.rst b/documentation/Install.rst index bba0ea89..686a91e6 100644 --- a/documentation/Install.rst +++ b/documentation/Install.rst @@ -9,13 +9,13 @@ User Installation $ git clone https://github.com/sogno-platform/cimpy.git $ cd cimpy - $ python setup.py install + $ python3 -m pip install . or .. code-block:: bash - $ pip install cimpy + $ python3 -m pip install cimpy Developer Installation ---------------------- @@ -24,10 +24,19 @@ Developer Installation $ git clone https://github.com/sogno-platform/cimpy.git $ cd cimpy - $ python setup.py develop + $ python3 -m pip install -e .[dev] or .. code-block:: bash - $ pip install --pre cimpy + $ python3 -m pip install --pre cimpy + + +Building a distributable package +-------------------------------- + +.. code-block:: bash + + $ python3 -m pip install --upgrade build + $ python3 -m build diff --git a/pyproject.toml b/pyproject.toml index 5194238d..59805049 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,52 @@ -[tool.black] +[project] +name = "cimpy" +version = "1.0.2" +description = "Python package for import, modification and export of CIM grid data" +authors = [ + {name="Institute for Automation of Complex Power Systems"}, + {name="OPAL-RT Technologies"} +] +readme = "README.md" +keywords = ["cim", "cgmes"] + +dependencies = [ + "lxml", + "xmltodict", + "chevron", +] + +requires-python = ">=3.8" + +classifiers = [ + "Development Status :: 5 - Production/Stable", + + "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", + + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11" +] + +[project.urls] +Homepage = "https://sogno.energy/cimpy/" +Documentation = "https://sogno.energy/cimpy/" +Repository = "https://github.com/sogno-platform/cimpy" +Issues = "https://github.com/sogno-platform/cimpy/issues" + +[project.optional-dependencies] +dev = [ + "pytest", + "pytest-check" +] + +[build-system] +requires = ["setuptools >= 61.0"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +include-package-data = true + + +[tool.black] line-length = 120 diff --git a/setup.py b/setup.py deleted file mode 100644 index 4ac7ea4e..00000000 --- a/setup.py +++ /dev/null @@ -1,16 +0,0 @@ -import setuptools - -setuptools.setup( - name="cimpy", - version="1.0.2", - description="Python package for import, modification and export of CIM grid data", - author="Institute for Automation of Complex Power Systems", - include_package_data=True, - license="MPL-2.0", - packages=setuptools.find_packages(), - install_requires=[ - "lxml", - "xmltodict", - "chevron", - ], -)