D .ci-scripts/srht-pypi.py => .ci-scripts/srht-pypi.py +0 -20
@@ 1,20 0,0 @@
-import subprocess
-import genlic.version
-import sys
-
-
-def main():
- res = subprocess.run(["git", "describe"], stdout=subprocess.PIPE)
- describe_out = res.stdout.decode("utf-8").split("-")
- print(describe_out)
- if len(describe_out) > 1:
- return 0
- elif genlic.version.version == describe_out[0].strip():
- res = subprocess.run("twine upload dist/*", shell=True)
- return res.returncode
- else:
- return 0
-
-
-if __name__ == "__main__":
- main()
M .gitignore => .gitignore +2 -0
@@ 1,2 1,4 @@
.venv
__pycache__
+dist
+*.egg-info
M LICENSE => LICENSE +0 -2
@@ 1,5 1,3 @@
-MIT License
-
Copyright (c) 2023 Samuel Eisenhandler
Permission is hereby granted, free of charge, to any person obtaining a copy
A README.md => README.md +3 -0
@@ 0,0 1,3 @@
+# genlic
+
+A simple utility for generating LICENSE files.
A pyproject.toml => pyproject.toml +24 -0
@@ 0,0 1,24 @@
+[build-system]
+requires = ["setuptools>=61.0"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "genlic"
+version = "0.1.0"
+authors = [
+ { name = "Samuel Eisenhandler", email="sgeisenhandler@gmail.com" },
+]
+description = "A script for generating LICENSE files"
+readme = "README.md"
+requires-python = ">=3.10"
+classifiers = [
+ "Programming Language :: Python :: 3",
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: OS Independent",
+]
+dependencies = [
+ "marshmallow",
+]
+
+[project.scripts]
+genlic = "genlic:main"
M requirements.txt => requirements.txt +0 -19
@@ 1,21 1,2 @@
-cachetools==5.2.1
-chardet==5.1.0
-colorama==0.4.6
-distlib==0.3.6
-filelock==3.9.0
-flake8==6.0.0
marshmallow==3.19.0
-mccabe==0.7.0
-mypy==0.991
-mypy-extensions==0.4.3
-nodeenv==1.7.0
packaging==23.0
-platformdirs==2.6.2
-pluggy==1.0.0
-pycodestyle==2.10.0
-pyflakes==3.0.1
-pyproject_api==1.4.0
-pyright==1.1.288
-tox==4.2.8
-typing_extensions==4.4.0
-virtualenv==20.17.1
M src/genlic.py => src/genlic.py +0 -2
@@ 94,8 94,6 @@ def load_config(path: Path) -> Config | None:
LICENSE_FMTS = {
"mit": """\
-MIT License
-
Copyright (c) {year} {holder}
Permission is hereby granted, free of charge, to any person obtaining a copy
M tox.ini => tox.ini +4 -5
@@ 4,10 4,9 @@ max-line-length = 100
[tox]
envlist =
format
- py310-mypy
- py311-mypy
+ mypy
-[textenv]
+[testenv]
deps =
-rrequirements.txt
@@ 17,9 16,9 @@ deps = black==22.12.0
skip_install = true
commands = black .
-[textenv:310-mypy]
+[testenv:mypy]
description = run mypy
deps =
mypy
{[testenv]deps}
-commands = mypy --install-types --non-interactive {toxinidir}/src
+commands = mypy --strict --install-types --non-interactive {toxinidir}/src