-
Notifications
You must be signed in to change notification settings - Fork 41
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 #37 from cmacmackin/modern-packaging
Automate publishing
- Loading branch information
Showing
3 changed files
with
65 additions
and
49 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,26 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build --sdist --wheel | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_DEPLOYMENT_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools >= 61.0.0", | ||
"setuptools_scm[toml] >= 6.2", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "markdown-include" | ||
description = "A Python-Markdown extension which provides an 'include' function" | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
classifiers = [ | ||
"Programming Language :: Python", | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Topic :: Internet :: WWW/HTTP :: Site Management", | ||
"Topic :: Software Development :: Documentation", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Text Processing :: Filters", | ||
"Topic :: Text Processing :: Markup :: HTML", | ||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
] | ||
keywords = ["Markdown", "typesetting", "include", "plugin", "extension"] | ||
license = {text = "GNU General Public License v3 (GPLv3)"} | ||
authors = [{name = "Chris MacMackin", email = "[email protected]"}] | ||
urls = {project = "https:/cmacmackin/markdown-include"} | ||
dependencies = [ | ||
"markdown>=3.0", | ||
] | ||
dynamic = ["version"] | ||
|
||
[tool.setuptools] | ||
packages = ["markdown_include"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "setuptools_scm.get_version" } |
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,2 @@ | ||
from setuptools import setup, find_packages | ||
from codecs import open # To use a consistent encoding | ||
from os import path | ||
|
||
here = path.abspath(path.dirname(__file__)) | ||
|
||
# Get the long description from the relevant file | ||
with open(path.join(here, 'README.rst'), encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
setup( | ||
name = 'markdown-include', | ||
packages = find_packages(), | ||
version = '0.7.0', | ||
description = 'This is an extension to Python-Markdown which provides an "include" function, similar to that found in LaTeX (and also the C pre-processor and Fortran). I originally wrote it for my FORD Fortran auto-documentation generator.', | ||
long_description = long_description, | ||
author = 'Chris MacMackin', | ||
author_email = '[email protected]', | ||
url = 'https:/cmacmackin/markdown-include/', | ||
download_url = 'https:/cmacmackin/markdown-include/tarball/v0.7.0', | ||
keywords = ['Markdown', 'typesetting', 'include', 'plugin', 'extension'], | ||
classifiers=[ | ||
# How mature is this project? Common values are | ||
# 3 - Alpha | ||
# 4 - Beta | ||
# 5 - Production/Stable | ||
'Development Status :: 5 - Production/Stable', | ||
|
||
# Indicate who your project is intended for | ||
'Intended Audience :: Developers', | ||
'Topic :: Internet :: WWW/HTTP :: Site Management', | ||
'Topic :: Software Development :: Documentation', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
'Topic :: Text Processing :: Filters', | ||
'Topic :: Text Processing :: Markup :: HTML', | ||
|
||
# Pick your license as you wish (should match "license" above) | ||
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', | ||
|
||
# Specify the Python versions you support here. In particular, ensure | ||
# that you indicate whether you support Python 2, Python 3 or both. | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.3', | ||
'Programming Language :: Python :: 3.4', | ||
], | ||
install_requires = ['markdown>=3.0'] | ||
) | ||
from setuptools import setup | ||
setup() |