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

Move to pyproject.toml instead of setup.py #20

Open
pstelzig opened this issue Oct 26, 2023 · 0 comments
Open

Move to pyproject.toml instead of setup.py #20

pstelzig opened this issue Oct 26, 2023 · 0 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@pstelzig
Copy link
Owner

Problem description

The previous de-facto standard to package Python projects using setuptools and a setup.py is now being replaced by pyproject.toml. See the official Python packaging guide.

Desired behavior

Move from setup.py to pyproject.toml to be future proof.

Problem with pyproject.toml

With the default installation of pip under Ubuntu 22.04, the local installation process pip3 install --user . fails. It installs a package called UNKOWN. This bug is already known and no other fix than installing a newer version of pip has been proposed.

A pyproject.toml for MoPyRegtest could look like

[project]
name = "MoPyRegtest" # Required
version = "0.4.0-alpha.1" # Required
description = "A Python enabled simple regression testing framework for Modelica models" # Optional
readme = "README.md" # Optional
requires-python = ">=3.8"
license = {file = "LICENSE"}
keywords = ["Modelica", "regression", "test", "automation"]  # Optional
authors = [
    {name = "Philipp Emanuel Stelzig"} # Optional
]
maintainers = [
    {name = "Philipp Emanuel Stelzig"} # Optional
]
classifiers = [  # Optional
    "Programming Language :: Python :: 3",
    "License :: OSI Approved :: MIT License",
    "Operating System :: Microsoft :: Windows :: Windows 10",
    "Operating System :: POSIX :: Linux"
]
dependencies = [ # Optional
    "numpy",
    "pandas"
]

[project.urls]  # Optional
"Homepage" = "https://github.com/pstelzig/mopyregtest"
"Bug Reports" = "https://github.com/pstelzig/MoPyRegtest/issues"
"Source" = "https://github.com/pstelzig/mopyregtest"

[project.scripts]  # Optional
mopyregtest = "mopyregtest.cli:main"

[tool.setuptools]
package-data = {"mopyregtest" = ["templates/omc/model_import.mos.template",
                                 "templates/omc/model_simulate.mos.template"]}

[build-system]
requires = ["setuptools>=43.0.0", "wheel"]
build-backend = "setuptools.build_meta"
@pstelzig pstelzig added enhancement New feature or request wontfix This will not be worked on labels Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant