Skip to content

Commit

Permalink
Merge pull request #213 from neutrinoceros/bld/flit-core-311
Browse files Browse the repository at this point in the history
BLD: switch build backend to `flit-core`
  • Loading branch information
neutrinoceros authored Feb 20, 2025
2 parents 9571870 + f490be6 commit 2b71fee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,17 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

# install the package without constaints first so build-time requirements
# are not affected by install-args
- run: uv sync --no-editable

# forcing bytecode compilation for colorspacious
# see https://github.com/astral-sh/uv/issues/4758
# Cannot use --frozen here because it overrides options like --resolution
- run: uv sync --group test --compile-bytecode --no-install-project --inexact ${{ matrix.install-args }}

- name: Run test suite
shell: bash # for windows compat
# forcing bytecode compilation for colorspacious
# see https://github.com/astral-sh/uv/issues/4758
# Cannot use --frozen here because it overrides options like --resolution
run: |
uv run --no-editable --compile-bytecode \
--group test ${{ matrix.install-args }} \
pytest --color yes -ra
run: uv run --no-sync pytest --color yes -ra

- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
if: failure()
Expand Down
17 changes: 4 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
requires = ["flit_core >=3.11,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "cmyt"
Expand All @@ -9,11 +9,12 @@ description = "A collection of Matplotlib colormaps from the yt project"
authors = [
{ name = "The yt project", email = "yt-dev@python.org" },
]
license = "BSD-3-Clause"
license-files = ["LICENSE"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Matplotlib",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: AIX",
"Operating System :: POSIX :: Linux",
Expand All @@ -30,9 +31,6 @@ dependencies = [
"numpy>=1.26.0, <3",
]

[project.license]
text = "BSD 3-Clause"

[project.readme]
file = "README.md"
content-type = "text/markdown"
Expand All @@ -52,13 +50,6 @@ test = [
"pytest>=6.2.4",
]

[tool.hatch.build.targets.sdist]
exclude = [
".*", # exclude dot files (.gitignore is still included)
"doc",
"tests",
]

[tool.ruff.lint]
exclude = ["*__init__.py"]
ignore = ["E501"]
Expand Down

0 comments on commit 2b71fee

Please sign in to comment.