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.
This commit is contained in:
KOLANICH
2022-11-10 15:17:14 +03:00
parent e6e23fd512
commit ca88e4e49d
4 changed files with 39 additions and 54 deletions

View File

@@ -21,11 +21,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install --upgrade setuptools wheel build twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
python -m build -nwsx .
twine upload dist/*

3
pyproject.toml Normal file
View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=42.2.0"]
build-backend = "setuptools.build_meta"

34
setup.cfg Normal file
View File

@@ -0,0 +1,34 @@
[metadata]
name = markdownify
version = 0.11.6
author = Matthew Tretter
author_email = m@tthewwithanm.com
description = Convert HTML to markdown.
url = http://github.com/matthewwithanm/python-markdownify
download_url = http://github.com/matthewwithanm/python-markdownify/tarball/master
long_description = file: README.rst
classifiers =
Environment :: Web Environment
Framework :: Django
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 2.5
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Topic :: Utilities
[options]
packages = find:
zip_safe = False
install_requires = beautifulsoup4>=4.9,<5; six>=1.15,<2
include_package_data = True
[options.packages.find]
include = markdownify, markdownify.*
[options.entry_points]
console_scripts = markdownify = markdownify.main:main

View File

@@ -1,52 +0,0 @@
#/usr/bin/env python
import codecs
import os
from setuptools import setup, find_packages
read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read()
pkgmeta = {
'__title__': 'markdownify',
'__author__': 'Matthew Tretter',
'__version__': '0.11.6',
}
read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read()
setup(
name='markdownify',
description='Convert HTML to markdown.',
long_description=read(os.path.join(os.path.dirname(__file__), 'README.rst')),
version=pkgmeta['__version__'],
author=pkgmeta['__author__'],
author_email='m@tthewwithanm.com',
url='http://github.com/matthewwithanm/python-markdownify',
download_url='http://github.com/matthewwithanm/python-markdownify/tarball/master',
packages=find_packages(),
zip_safe=False,
include_package_data=True,
install_requires=[
'beautifulsoup4>=4.9,<5',
'six>=1.15,<2',
],
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Utilities'
],
entry_points={
'console_scripts': [
'markdownify = markdownify.main:main'
]
}
)