Skip to content

Commit 46dc1a0

Browse files
AlexVonBKOLANICH
andauthored
Migrated the metadata into PEP 621-compliant pyproject.toml (#138)
* Move the metadata from `setup.py` into `setup.cfg`. Added `pyproject.toml`. Removed `setup.py` - it is no longer needed. Got rid of tests erroroneously finding their way into the wheel. * Started populating version automatically from git tags using `setuptools_scm`. * Migrated the metadata into `PEP 621`-compliant `pyproject.toml`, got rid of `setup.cfg`. * test build in develop and pull requests * use static version instead of dynamic git tag info --------- Co-authored-by: KOLANICH <kolan_n@mail.ru>
1 parent f6c8daf commit 46dc1a0

File tree

4 files changed

+51
-55
lines changed

4 files changed

+51
-55
lines changed

.github/workflows/python-app.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ jobs:
2323
- name: Install dependencies
2424
run: |
2525
python -m pip install --upgrade pip
26-
pip install tox
26+
pip install --upgrade setuptools setuptools_scm wheel build tox
2727
- name: Lint and test
2828
run: |
2929
tox
30+
- name: Build
31+
run: |
32+
python -m build -nwsx .

.github/workflows/python-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ jobs:
2121
- name: Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip
24-
pip install setuptools wheel twine
24+
pip install --upgrade setuptools setuptools_scm wheel build twine
2525
- name: Build and publish
2626
env:
2727
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
2828
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
2929
run: |
30-
python setup.py sdist bdist_wheel
30+
python -m build -nwsx .
3131
twine upload dist/*

pyproject.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[build-system]
2+
requires = ["setuptools>=61.2", "setuptools_scm[toml]>=3.4.3"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "markdownify"
7+
version = "0.13.0"
8+
authors = [{name = "Matthew Tretter", email = "m@tthewwithanm.com"}]
9+
description = "Convert HTML to markdown."
10+
readme = "README.rst"
11+
classifiers = [
12+
"Environment :: Web Environment",
13+
"Framework :: Django",
14+
"Intended Audience :: Developers",
15+
"License :: OSI Approved :: MIT License",
16+
"Operating System :: OS Independent",
17+
"Programming Language :: Python :: 2.5",
18+
"Programming Language :: Python :: 2.6",
19+
"Programming Language :: Python :: 2.7",
20+
"Programming Language :: Python :: 3.6",
21+
"Programming Language :: Python :: 3.7",
22+
"Programming Language :: Python :: 3.8",
23+
"Topic :: Utilities",
24+
]
25+
dependencies = [
26+
"beautifulsoup4>=4.9,<5",
27+
"six>=1.15,<2"
28+
]
29+
30+
[project.urls]
31+
Homepage = "http://github.com/matthewwithanm/python-markdownify"
32+
Download = "http://github.com/matthewwithanm/python-markdownify/tarball/master"
33+
34+
[project.scripts]
35+
markdownify = "markdownify.main:main"
36+
37+
[tool.setuptools]
38+
zip-safe = false
39+
include-package-data = true
40+
41+
[tool.setuptools.packages.find]
42+
include = ["markdownify", "markdownify.*"]
43+
namespaces = false
44+
45+
[tool.setuptools_scm]

setup.py

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)