forked from github.com/blag
moved to pyproject toml
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
## [unreleased]
|
||||
|
||||
* moved to pyproject.toml
|
||||
* added python 3.11 to test suite
|
||||
* break out lint and mypy from test matrix and only run on linux- and latest
|
||||
stable python to make it a bit more efficient
|
||||
|
||||
19
Makefile
19
Makefile
@@ -14,13 +14,13 @@ endif
|
||||
|
||||
|
||||
.PHONY: all
|
||||
all: lint mypy test
|
||||
all: lint mypy test test-release
|
||||
|
||||
$(VENV): requirements.txt requirements-dev.txt setup.py
|
||||
$(VENV): requirements.txt requirements-dev.txt pyproject.toml
|
||||
$(PY) -m venv $(VENV)
|
||||
$(BIN)/pip install --upgrade -r requirements.txt
|
||||
$(BIN)/pip install --upgrade -r requirements-dev.txt
|
||||
$(BIN)/pip install -e .
|
||||
$(BIN)/pip install -e .['dev']
|
||||
touch $(VENV)
|
||||
|
||||
.PHONY: test
|
||||
@@ -35,10 +35,17 @@ mypy: $(VENV)
|
||||
lint: $(VENV)
|
||||
$(BIN)/flake8
|
||||
|
||||
.PHONY: release
|
||||
release: $(VENV)
|
||||
.PHONY: build
|
||||
build: $(VENV)
|
||||
rm -rf dist
|
||||
$(BIN)/python setup.py sdist bdist_wheel
|
||||
$(BIN)/python3 -m build
|
||||
|
||||
.PHONY: test-release
|
||||
test-release: $(VENV) build
|
||||
$(BIN)/twine check dist/*
|
||||
|
||||
.PHONY: release
|
||||
release: $(VENV) build
|
||||
$(BIN)/twine upload dist/*
|
||||
|
||||
.PHONY: docs
|
||||
|
||||
67
pyproject.toml
Normal file
67
pyproject.toml
Normal file
@@ -0,0 +1,67 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=64.0"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "blag"
|
||||
authors = [
|
||||
{ name="Bastian Venthur", email="mail@venthur.de" },
|
||||
]
|
||||
description = "blog-aware, static site generator"
|
||||
keywords = ["markdown", "blag", "blog", "static site generator", "cli"]
|
||||
readme = "README.md"
|
||||
license = { file="LICENSE" }
|
||||
requires-python = ">=3.8"
|
||||
dynamic = ["version"]
|
||||
dependencies = [
|
||||
"markdown",
|
||||
"feedgenerator",
|
||||
"jinja2",
|
||||
"pygments",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
blag = "blag.blag:main"
|
||||
|
||||
[project.urls]
|
||||
'Documentation' = 'https://blag.readthedocs.io/'
|
||||
'Source' = 'https://github.com/venthur/blag'
|
||||
'Changelog' = 'https://github.com/venthur/blag/blob/master/CHANGELOG.md'
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"build",
|
||||
"sphinx",
|
||||
"twine",
|
||||
"wheel",
|
||||
"pytest",
|
||||
"pytest-cov",
|
||||
"flake8",
|
||||
"mypy",
|
||||
"types-markdown",
|
||||
]
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
version = {attr = "blag.__VERSION__" }
|
||||
|
||||
[tool.setuptools]
|
||||
packages = ["blag"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
blag = ["templates/*"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
addopts = """
|
||||
--cov=blag
|
||||
--cov=tests
|
||||
--cov-report=html
|
||||
--cov-report=term-missing:skip-covered
|
||||
"""
|
||||
|
||||
[tool.mypy]
|
||||
files = "blag,tests"
|
||||
strict = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "feedgenerator.*"
|
||||
ignore_missing_imports = true
|
||||
@@ -1,3 +1,4 @@
|
||||
build==0.9.0
|
||||
sphinx==5.3.0
|
||||
twine==4.0.1
|
||||
wheel==0.37.1
|
||||
|
||||
16
setup.cfg
16
setup.cfg
@@ -1,16 +0,0 @@
|
||||
[tool:pytest]
|
||||
addopts =
|
||||
--cov=blag
|
||||
--cov=tests
|
||||
--cov-report=html
|
||||
--cov-report=term-missing:skip-covered
|
||||
|
||||
[flake8]
|
||||
exclude = venv,build,docs
|
||||
|
||||
[mypy]
|
||||
files = blag,tests
|
||||
strict = True
|
||||
|
||||
[mypy-feedgenerator.*]
|
||||
ignore_missing_imports = True
|
||||
42
setup.py
42
setup.py
@@ -1,42 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
meta = {}
|
||||
exec(open('./blag/version.py').read(), meta)
|
||||
meta['long_description'] = open('./README.md').read()
|
||||
|
||||
setup(
|
||||
name='blag',
|
||||
version=meta['__VERSION__'],
|
||||
description='blog-aware, static site generator',
|
||||
long_description=meta['long_description'],
|
||||
long_description_content_type='text/markdown',
|
||||
keywords='markdown blag blog static site generator cli',
|
||||
author='Bastian Venthur',
|
||||
author_email='mail@venthur.de',
|
||||
url='https://github.com/venthur/blag',
|
||||
project_urls={
|
||||
'Documentation': 'https://blag.readthedocs.io/',
|
||||
'Source': 'https://github.com/venthur/blag',
|
||||
'Changelog':
|
||||
'https://github.com/venthur/blag/blob/master/CHANGELOG.md',
|
||||
},
|
||||
python_requires='>=3.8',
|
||||
package_data={
|
||||
'blag': ['templates/*'],
|
||||
},
|
||||
install_requires=[
|
||||
'markdown',
|
||||
'feedgenerator',
|
||||
'jinja2',
|
||||
'pygments',
|
||||
],
|
||||
packages=['blag'],
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'blag = blag.blag:main'
|
||||
]
|
||||
},
|
||||
license='MIT',
|
||||
)
|
||||
Reference in New Issue
Block a user