Skip to content

Commit

Permalink
replace setup.py with pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard committed Jun 13, 2023
1 parent c0b4bf8 commit 0b6771b
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 110 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
variant: [spatialite, postgis, npm]
python-version: ["3.11"]
django-version: [4.1.3]
django-version: [4.2.2]
drf-version: [3.14.0]
steps:
- uses: actions/checkout@v2
Expand All @@ -26,14 +26,18 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
python -m pip install flake8 pytest wheel
python -m pip install django==${{ matrix.django-version }}
python -m pip install djangorestframework==${{ matrix.drf-version }}
python -m pip install xlsconv
python -m pip install wq.build==2.0.0a0
python -m pip install wq.app==2.0.0a0
python -m pip install wq.db==2.0.0a0
python -m pip install .
- name: Test build
run: |
python -m build
python -m pip install dist/*.whl
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down Expand Up @@ -111,6 +115,7 @@ jobs:
- name: Publish to Github Packages
if: ${{ github.event_name == 'push' }}
run: |
python -m pip install setuptools_scm
./set_dev_version.sh
cd packages/$PACKAGE
echo "registry=https://npm.pkg.github.com/wq" > .npmrc
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "django_project"]
path = django_project
path = wq/create/django_project
url = https://github.com/wq/wq-django-template.git
60 changes: 60 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[build-system]
requires = ["setuptools", "setuptools-scm"]

[project]
name = "wq.create"
dynamic = ["version"]
authors = [
{name = "S. Andrew Sheppard", email = "andrew@wq.io"},
]
description = "Project scaffolding tools for creating a new application with the wq framework."
readme = "README.md"
requires-python = ">=3.7"
license = {text = "MIT"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: JavaScript",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Code Generators",
"Topic :: Text Processing :: Markup :: HTML",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Pre-processors",
]
dependencies = [
"wq.build",
"psycopg2-binary",
"xlsconv>=1.2.0",
]

[project.entry-points.wq]
"wq.create" = "wq.create"

[project.urls]
Homepage = "https://wq.io/wq.create/"
Documentation = "https://wq.io/"
Source = "https://github.com/wq/wq.create"
"Release Notes" = "https://github.com/wq/wq.create/releases"
Issues = "https://github.com/wq/wq.create/issues"
CI = "https://github.com/wq/wq.create/actions/workflows/test.yml"

[tool.setuptools.packages.find]
include = ["wq.create*"]
exclude = ["wq.create.django_project.*"]

[tool.setuptools.package-data]
"wq.create.django_project" = [ "**/*", "**/.gitignore" ]

[tool.setuptools_scm]
2 changes: 1 addition & 1 deletion set_dev_version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
VERSION=`python3 setup.py --version | \
VERSION=`python -m setuptools_scm | \
sed s/\.dev/-dev/ | \
sed s/+/./ | \
sed "s/\.d[0-9]\{8\}$//" | \
Expand Down
106 changes: 0 additions & 106 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0b6771b

Please sign in to comment.