-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from freakboy3742/pep621
Switch to PEP621 project format
- Loading branch information
Showing
8 changed files
with
170 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
# Check for updates on Sunday, 8PM UTC | ||
interval: "weekly" | ||
day: "sunday" | ||
time: "20:00" | ||
|
||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
# Check for updates on Sunday, 8PM UTC | ||
interval: "weekly" | ||
day: "sunday" | ||
time: "20:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,17 @@ on: | |
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
FORCE_COLOR: "1" | ||
|
||
jobs: | ||
pretest: | ||
name: Pre-test checks | ||
|
@@ -30,7 +41,7 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox | ||
pip install -e .[dev] | ||
- name: Run pre-test checks | ||
run: | | ||
tox -e package | ||
|
@@ -40,8 +51,27 @@ jobs: | |
needs: pretest | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev"] | ||
macOS-version: ["macos-11", "macos-12"] | ||
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev" ] | ||
macOS-version: [ | ||
# x86_64 runners | ||
"macos-11", "macos-12", "macos-13", | ||
# M1 runners | ||
"macos-14" | ||
] | ||
|
||
include: | ||
- experimental: false | ||
- python-version: "3.13-dev" | ||
experimental: true | ||
|
||
exclude: | ||
# actions/setup-python doesn't provide Python3.8 or 3.9 for M1. | ||
- macOS-version: "macos-14" | ||
python-version: "3.8" | ||
|
||
- macOS-version: "macos-14" | ||
python-version: "3.9" | ||
|
||
runs-on: ${{ matrix.macOS-version }} | ||
steps: | ||
- uses: actions/[email protected] | ||
|
@@ -52,7 +82,7 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade tox | ||
pip install -e .[dev] | ||
- name: Test | ||
run: | | ||
tox -e py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Update pre-commit | ||
|
||
on: | ||
schedule: | ||
- cron: "0 20 * * SUN" # Sunday @ 2000 UTC | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pre-commit-update: | ||
name: Update pre-commit | ||
uses: beeware/.github/.github/workflows/pre-commit-update.yml@main | ||
with: | ||
create-changenote: false | ||
secrets: | ||
BRUTUS_PAT_TOKEN: ${{ secrets.BRUTUS_PAT_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,77 @@ | ||
[build-system] | ||
requires = ["setuptools>=60"] | ||
requires = [ | ||
"setuptools==69.0.0", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
dynamic = ["version"] | ||
name = "ds_store" | ||
description = "Manipulate Finder .DS_Store files from Python" | ||
readme = "README.rst" | ||
requires-python = ">= 3.8" | ||
license.text = "New BSD" | ||
authors = [ | ||
{name="Alastair Houghton", email="[email protected]"} | ||
] | ||
maintainers = [ | ||
{name="Russell Keith-Magee", email="[email protected]"} | ||
] | ||
keywords = [ | ||
"DS_Store" | ||
] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Topic :: Desktop Environment", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
dependencies = [ | ||
"mac_alias >= 2.0.1", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "http://alastairs-place.net/projects/ds_store" | ||
Source = "https://github.com/dmgbuild/ds_store" | ||
|
||
[project.scripts] | ||
ds_store = "ds_store.__main__:main" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"coverage == 7.4.1", | ||
# Pre-commit 3.6.0 deprecated support for Python 3.8 | ||
"pre-commit == 3.5.0 ; python_version < '3.9'", | ||
"pre-commit == 3.6.0 ; python_version >= '3.9'", | ||
"pytest == 8.0.0", | ||
"pytest-cov == 4.1.0", | ||
"tox == 4.12.1", | ||
] | ||
docs = [ | ||
# Sphinx 7.2 deprecated support for Python 3.8 | ||
"sphinx == 7.1.2 ; python_version < '3.9'", | ||
"sphinx == 7.2.6 ; python_version >= '3.9'", | ||
"sphinx-autobuild == 2021.3.14", | ||
"sphinx_rtd_theme == 2.0.0" | ||
] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "ds_store.__version__"} | ||
|
||
[tool.isort] | ||
profile = "black" | ||
split_on_trailing_comma = true | ||
combine_as_imports = true | ||
skip_glob = [ | ||
"docs/conf.py", | ||
"venv*", | ||
"local", | ||
] | ||
multi_line_output = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
# Tox (http://tox.testrun.org/) is a tool for running tests | ||
# in multiple virtualenvs. This configuration file will run the | ||
# test suite on all supported python versions. To use it, "pip install tox" | ||
# and then run "tox" from this directory. | ||
# flake8 doesn't believe in pyproject.toml, so we keep the configuration here. | ||
[flake8] | ||
exclude=\ | ||
.eggs/*,\ | ||
build/*,\ | ||
docs/*,\ | ||
.tox/*,\ | ||
venv* | ||
extend_ignore=C901,E203 | ||
max-line-length = 119 | ||
|
||
[tox] | ||
envlist = flake8,docs,package,py{37,38,39,310,311,312} | ||
envlist = docs,package,py{38,39,310,311,312,313} | ||
skip_missing_interpreters = true | ||
isolated_build = True | ||
|
||
[testenv] | ||
extras = | ||
test | ||
dev | ||
commands = | ||
pytest --cov -vv | ||
coverage xml | ||
python -m pytest --cov -vv | ||
|
||
[testenv:flake8] | ||
skip_install = True | ||
deps = | ||
flake8 | ||
commands = flake8 {posargs} | ||
|
||
[testenv:docs] | ||
build_dir = _build | ||
change_dir = docs | ||
extras = | ||
docs | ||
# -W: make warnings into errors | ||
# --keep-going: continue on errors | ||
# -j: run with multiple processes | ||
# -n: nitpick mode | ||
# -v: verbose logging | ||
# -E: force rebuild of environment | ||
# -T: print traceback on error | ||
# -a: read/parse all files | ||
# -d: use tox's temp dir for caching | ||
commands = | ||
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html | ||
python -m sphinx build -W --keep-going -j auto -n -v -E -T -a -d _build/doctrees -b html . _build/html | ||
|
||
[testenv:package] | ||
skip-install = True | ||
passenv = FORCE_COLOR | ||
deps = | ||
check_manifest | ||
build | ||
twine | ||
build==1.0.3 | ||
twine==4.0.2 | ||
commands = | ||
check-manifest -v | ||
python -m build --sdist --wheel --outdir dist/ . | ||
python -m twine check dist/* | ||
|
||
[testenv:publish] | ||
deps = | ||
wheel | ||
twine | ||
passenv = | ||
TWINE_USERNAME | ||
TWINE_PASSWORD | ||
commands = | ||
python -m twine upload dist/* |