Skip to content

Commit

Permalink
Merge branch 'feature/pyproject-fix' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
wpk committed Apr 6, 2023
2 parents 79507b3 + db93d0b commit 65bdcc4
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 33 deletions.
1 change: 0 additions & 1 deletion environment/dist-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ dependencies:
- setuptools
- setuptools-scm
- twine
- setuptools_scm_git_archive
- build
28 changes: 11 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
requires = [
"setuptools>=61.2",
"setuptools_scm[toml]>=3.4",
"setuptools_scm_git_archive",
]
build-backend = "setuptools.build_meta"

Expand Down Expand Up @@ -68,22 +67,17 @@ test = [
# dev = []
# docs = []

[tool.setuptools]
package-dir = {"" = "src"}
zip-safe = true # if using mypy, must be False
include-package-data = true
license-files = ["LICENSE"]

[tool.setuptools.packages.find]
where = ["src"]
namespaces = false

# To add package data
# [tool.setuptools.package-data]
# thermoextrap = [
# "py.typed"
# ]

## Defer this to setup.cfg
## Will transition when everything works (grayskull in particular)
## and will remove setup.py
# [tool.setuptools]
# zip-safe = true
# include-package-data = true
# license-files = ["LICENSE"]

# [tool.setuptools.packages.find]
# namespaces = true
# where = ["src"]

[tool.setuptools.dynamic]
readme = {file = ["README.md", "HISTORY.md", "LICENSE"], content-type = "text/markdown"}
Expand Down
41 changes: 26 additions & 15 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
# Only keep this for configs for some tools
# flake8 in particular doesn't allow for config in pyproject.toml
# TODO : remove all of this when I can
#
# For now, need metadata.url and options.* (as well as setup.py)
# to make grayskull correctly parse the repo for a recipe.
# That's the only reason. When grayskull better handles [tool.setuptools]
# in pyproject.toml, I'll remove those sections, and `setup.py`.
#
#
# * I need metadata.url to get the homepage correct in the generated meta.yaml
#
# * I need options.* to get the subpackages (lnpy and lnPi) correctly
# * This is due to the project `tmmc-lnpy` being different to the package(s).
#
#
# * flake8 doesn't support pyproject.toml
#
[metadata]
url = https://github.com/usnistgov/thermo-extrap

# [tool:pytest]
# addopts = --doctest-modules
# testpaths = src/cmomy/tests src/cmomy
[options]
packages = find_namespace:
package_dir=
=src
include_package_data = True
zip_safe = True # if using mypy, must be False

# [tool:docformatter]
# recursive = true
# in-place = true

# [isort]
# profile = black
# skip_gitignore = true
# force_to_top = true
# default_section = THIRDPARTY
# known_first_party = cmomy
[options.packages.find]
where=src

[flake8]
docstring-convention = numpy
Expand Down
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# noqa
from setuptools import setup

setup()
# use_scm_version={"fallback_version": "999"},
# license_files=["LICENSE"],
# zip_safe=True,
# packages=find_namespace_packages(where="src"),
# package_dir={"": "src"},
# include_package_data=True,
# url="https://github.com/usnistgov/tmmc-lnpy",
# )

0 comments on commit 65bdcc4

Please sign in to comment.