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

Switch to pyproject.toml and Hatch build #422

Merged
merged 1 commit into from Oct 21, 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
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Expand Up @@ -17,14 +17,14 @@ jobs:
cache: 'pip'
- name: Build and Publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }}
HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install -U hatch
pip install -r requirements.txt;
python setup.py sdist bdist_wheel
twine upload dist/* --verbose
hatch build
hatch publish
release-docker:
runs-on: ubuntu-latest
steps:
Expand Down
60 changes: 60 additions & 0 deletions pyproject.toml
@@ -0,0 +1,60 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "mkdocs-simple-plugin"
dynamic = ["version"]
description = "Plugin for adding simple wiki site creation from markdown files interspersed within your code with MkDocs."
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3"
authors = [
{ name = "Allison Thackston", email = "allison@allisonthackston.com" },
]
keywords = [
"mkdocs",
"readme",
"wiki",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
# md file="versions.snippet"
# _Python 3.x, 3.7, 3.8, 3.9, 3.10 supported._
# /md
dependencies = [
"click>=7.1",
"MarkupSafe>=2.1.1",
"mkdocs>=1.4.0",
"PyYAML>=6.0",
]

[project.scripts]
mkdocs_simple_gen = "mkdocs_simple_plugin.generator:main"

[project.entry-points."mkdocs.plugins"]
simple = "mkdocs_simple_plugin.plugin:SimplePlugin"

[project.urls]
Documentation = "http://althack.dev/mkdocs-simple-plugin"
Homepage = "http://althack.dev/mkdocs-simple-plugin"
Issues = "https://github.com/athackst/mkdocs-simple-plugin/issues"
"Source Code" = "https://github.com/athackst/mkdocs-simple-plugin"

[tool.hatch.version]
path = "VERSION"
pattern = "(?P<version>.+)"

[tool.hatch.build.targets.sdist]
include = [
"/mkdocs_simple_plugin",
]
4 changes: 1 addition & 3 deletions setup.py
Expand Up @@ -44,6 +44,4 @@
'mkdocs.plugins': ["simple = mkdocs_simple_plugin.plugin:SimplePlugin"],
'console_scripts': ["mkdocs_simple_gen = mkdocs_simple_plugin.generator:main"]})

# md file="versions.snippet"
# _Python 3.x, 3.7, 3.8, 3.9, 3.10 supported._
# /md