Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate publishing #37

Merged
merged 3 commits into from Nov 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/publish.yaml
@@ -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 }}
37 changes: 37 additions & 0 deletions pyproject.toml
@@ -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 = "cmacmackin@gmail.com"}]
urls = {project = "https://github.com/cmacmackin/markdown-include"}
dependencies = [
"markdown>=3.0",
]
dynamic = ["version"]

[tool.setuptools]
packages = ["markdown_include"]

[tool.setuptools.dynamic]
version = { attr = "setuptools_scm.get_version" }
51 changes: 2 additions & 49 deletions setup.py
@@ -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 = 'cmacmackin@gmail.com',
url = 'https://github.com/cmacmackin/markdown-include/',
download_url = 'https://github.com/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()