From ead32548339da67df3902a76fbcc6ad8159c967c Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Wed, 17 Feb 2021 20:41:38 +0300 Subject: [PATCH] Replaced setup.py with setup.cfg. Added pyproject.toml. Fetching version from git tags since now. --- publish.sh | 4 ++++ pyproject.toml | 5 +++++ setup.cfg | 23 +++++++++++++++++++++++ setup.py | 43 ------------------------------------------- 4 files changed, 32 insertions(+), 43 deletions(-) create mode 100755 publish.sh create mode 100644 pyproject.toml create mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/publish.sh b/publish.sh new file mode 100755 index 0000000..0be3cf2 --- /dev/null +++ b/publish.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +pip3 install --user --U setuptools wheel twine build +python3 -m build -nx . +python3 -m twine upload --repository pypi dist/* diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..66ddafd --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,5 @@ +[build-system] +requires = ["setuptools>=44", "wheel", "setuptools_scm[toml]>=3.4.3"] +build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..50091d5 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,23 @@ +[metadata] +name = wg-meshconf +author = K4YT3X +author_email = k4yt3x@k4yt3x.com +license = GNU General Public License v3.0 +description = wg-meshconf is a tool that will help you to generate peer configuration files for WireGuard mesh networks +url = https://github.com/k4yt3x/wg-meshconf +long_description = file: README.md +long_description_content_type = text/markdown +classifiers = + Topic :: Security :: Cryptography + Environment :: Console + Programming Language :: Python + Programming Language :: Python :: 3 + Operating System :: OS Independent + +[options] +packages = find: +install_requires = cryptography; prettytable +python_requires = >=3.6 + +[options.entry_points] +console_scripts = wg-meshconf = wg_meshconf:main diff --git a/setup.py b/setup.py deleted file mode 100644 index 3d37343..0000000 --- a/setup.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -""" -Name: wg-meshconf PyPI setup file -Creator: dimon222 -Date Created: January 11, 2021 -Last Modified: January 11, 2021 - -Dev: K4YT3X -Last Modified: January 26, 2021 - -pip3 install --user --U setuptools wheel twine -python3 setup.py sdist bdist_wheel -python3 -m twine upload --repository pypi dist/* -""" - -import setuptools - -with open("README.md", "r") as fh: - LONG_DESCRIPTION = fh.read() - -setuptools.setup( - name="wg-meshconf", - version="2.2.0", - author="K4YT3X", - author_email="k4yt3x@k4yt3x.com", - description="wg-meshconf is a tool that will help you to generate peer configuration files for WireGuard mesh networks", - long_description=LONG_DESCRIPTION, - long_description_content_type="text/markdown", - url="https://github.com/k4yt3x/wg-meshconf", - packages=setuptools.find_packages(), - license="GNU General Public License v3.0", - install_requires=["cryptography", "prettytable"], - classifiers=[ - "Topic :: Security :: Cryptography", - "Environment :: Console", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Operating System :: OS Independent", - ], - python_requires=">=3.6", - entry_points={"console_scripts": ["wg-meshconf = wg_meshconf:main"]}, -)