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

switch away from setup.py to pyproject.toml #195

Merged
merged 4 commits into from
Apr 22, 2024
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ https://python-hydro.github.io/pyro2
Alternately, you can install directly from source, via

```
python setup.py install --user
pip install .
```

or you can use `develop` instead of `install` if you are
you can optionally add the `-e` argument to `install` if you are
planning on developing pyro solvers directly.

- Not all matplotlib backends allow for the interactive plotting as
Expand Down
2 changes: 1 addition & 1 deletion docs/source/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pyro follows a standard python package structure. The main directory

* ``www/`` : the logo used in the website

It is at this level (``pyro2/``) that the installation of pyro is done (via ``setup.py``).
It is at this level (``pyro2/``) that the installation of pyro is done (via ``pyproject.toml``).

``pyro/``
^^^^^^^^^
Expand Down
6 changes: 3 additions & 3 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ The easiest way to install python is via PyPI using pip:

pip install pyro-hydro

Alternately, you can install from source, using the ``setup.py``.
Alternately, you can install from source.
From the ``pyro2/`` directory, we do:

.. prompt:: bash

python setup.py install --user
pip install .

This will put the main driver, ``pyro_sim.py``, in your path, and
allow you to run pyro from anywhere.
Expand All @@ -31,7 +31,7 @@ If you intend on directly developing the solvers, you can instead do:

.. prompt:: bash

python setup.py develop --user
pip install -e .

This will allow you to modify the python source without having to
reinstall each time something changes.
Expand Down
2 changes: 1 addition & 1 deletion postBuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

python setup.py install
pip install .


59 changes: 58 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,63 @@
# pyproject.toml
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"


# project metadata

[project]
name = "pyro-hydro"
description = "A python hydrodynamics code for teaching and prototyping"
readme = "README.md"
license.text = "BSD"
authors = [
{name="pyro development group"},
{email="[email protected]"},
]
dynamic = ["version"]

dependencies = [
"numba",
"numpy",
"matplotlib",
"h5py",
]

[project.scripts]
"pyro_sim.py" = "pyro.pyro_sim:main"

[project.urls]
Homepage = "https://github.com/python-hydro/pyro2"
Documentation = "https://python-hydro.github.io/pyro2"

# packaging

[tool.setuptools]
zip-safe = false
# we explicitly list the data we want below
include-package-data = false

[tool.setuptools.packages.find]
include = ["pyro*"]
exclude = ["*.tests*"]
namespaces = false

[tool.setuptools.package-data]
# additional files to include when building a wheel
pyro = [
"_defaults",
"**/_defaults",
"**/*.defaults",
"**/inputs*",
"*/tests/*.h5"
]

[tool.setuptools_scm]
version_scheme = "post-release"
version_file = "pyro/_version.py"

# development tools

[tool.pylint."MESSAGES CONTROL"]
disable = [
Expand Down
44 changes: 0 additions & 44 deletions setup.py

This file was deleted.