From 44d82c5a54de8415b88acfd60c844bbfa868c7e5 Mon Sep 17 00:00:00 2001 From: Rupus Reinefjord Date: Sat, 27 Jan 2024 19:06:28 +0100 Subject: [PATCH] try to make packaging more better --- pass2csv => pass2csv.py | 7 +++++-- pyproject.toml | 34 +++++++++++++++++++++++++++++++++- setup.cfg | 23 ----------------------- 3 files changed, 38 insertions(+), 26 deletions(-) rename pass2csv => pass2csv.py (99%) delete mode 100644 setup.cfg diff --git a/pass2csv b/pass2csv.py similarity index 99% rename from pass2csv rename to pass2csv.py index c5a9b49..faf6aa0 100755 --- a/pass2csv +++ b/pass2csv.py @@ -7,7 +7,7 @@ import sys import gnupg -__version__ = '1.1.0' +__version__ = '1.1.1' def stderr(s, *args, **kwargs): @@ -259,7 +259,7 @@ def compile_regexp(pattern): return regexp -if __name__ == '__main__': +def cli(): parsed = parse_args() failed = False @@ -310,3 +310,6 @@ if __name__ == '__main__': } main(**kwargs) + +if __name__ == '__main__': + cli() diff --git a/pyproject.toml b/pyproject.toml index 9787c3b..08c2c63 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,35 @@ [build-system] -requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" +requires = ["setuptools"] + +[project] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: End Users/Desktop", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Topic :: Utilities" +] +dependencies = ["python-gnupg"] +description = 'Export pass(1), "the standard unix password manager", to CSV' +dynamic = ["version"] +keywords = ["csv", "export", "pass2csv"] +maintainers = [ + {name = "Rupus Reinefjord", email = "rupus@reinefjord.net"} +] +name = "pass2csv" +readme = "README.md" +requires-python = ">=3.6" + +[project.scripts] +pass2csv = "pass2csv:cli" + +[project.urls] +Changelog = "https://github.com/reinefjord/pass2csv/releases" +Homepage = "https://github.com/reinefjord/pass2csv" + +[tool.setuptools.dynamic] +version = {attr = "pass2csv.__version__"} diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 9c6f628..0000000 --- a/setup.cfg +++ /dev/null @@ -1,23 +0,0 @@ -[metadata] -name = pass2csv -version = 1.1.0 -author = Rupus Reinefjord -author_email = rupus@reinefjord.net -description = Export pass(1), "the standard unix password manager", to CSV -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/reinefjord/pass2csv -classifiers = - Development Status :: 5 - Production/Stable - Environment :: Console - Intended Audience :: End Users/Desktop - License :: OSI Approved :: MIT License - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.6 - Topic :: Utilities - -[options] -scripts = pass2csv -python_requires = >= 3.6 -install_requires = python-gnupg