Skip to content

Commit

Permalink
Use Build to build package (#1)
Browse files Browse the repository at this point in the history
* Removed setup.cfg by moving settings to pyproject.toml and tox.ini

* Removed setup.py and build package with "build".

* Updated MANIFEST.in

Used check-manifest to identify issues, and to fix.
  • Loading branch information
smithdc1 authored Dec 23, 2022
1 parent f25a27c commit 4ca9ae5
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 65 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ jobs:
python-version: "3.10"
- name: Install dependencies
run: |
pip install setuptools wheel twine
pip install build twine
- name: Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
8 changes: 6 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
include LICENSE
include MANIFEST.in
include README.md
recursive-include crispy_bootstrap3/templates *
recursive-include crispy_bootstrap3/templates *
include *.md
include tox.ini
recursive-include requirements *.txt
recursive-include tests *.html
recursive-include tests *.py
1 change: 1 addition & 0 deletions crispy_bootstrap3/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "2022.1"
48 changes: 48 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "crispy-bootstrap3"
description = "Bootstrap3 template pack for django-crispy-forms"
authors = [ { name = "David Smith" } ]
license = {text = "MIT"}
requires-python = ">=3.7"
readme = "README.md"
dependencies = [
"django-crispy-forms>=1.14.0",
"django>=3.2",
]
classifiers=[
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dynamic = ['version']

[project.urls]
"Homepage" = "https://github.com/django-crispy-forms/crispy-bootstrap3"
"Issues" = "https://github.com/django-crispy-forms/crispy-bootstrap3/issues"
"CI" = "https://github.com/django-crispy-forms/crispy-bootstrap3/actions"
"Changelog" = "https://github.com/django-crispy-forms/crispy-bootstrap3/releases"

[tool.setuptools.dynamic]
version = {attr = "crispy_bootstrap3.__version__"}

[tool.isort]
profile = "black"

[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "tests.test_settings"
8 changes: 0 additions & 8 deletions setup.cfg

This file was deleted.

53 changes: 0 additions & 53 deletions setup.py

This file was deleted.

3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ commands =
flake8 .
deps =
-rrequirements/lint.txt

[flake8]
max-line-length = 88

0 comments on commit 4ca9ae5

Please sign in to comment.