From 21f48b7c85ab5cc3f96d8305201850f7a73f8804 Mon Sep 17 00:00:00 2001 From: Sergei Korolev Date: Tue, 6 Jun 2023 14:45:07 +0300 Subject: [PATCH] build(package): migrate to pyproject --- .gitignore | 6 +++++- LICENSE | 7 +++++++ MANIFEST.in | 2 -- __init__.py | 0 pyproject.toml | 40 ++++++++++++++++++++++++++++++++++++++++ requirements.txt | 1 - setup.py | 32 -------------------------------- 7 files changed, 52 insertions(+), 36 deletions(-) create mode 100644 LICENSE delete mode 100644 MANIFEST.in delete mode 100644 __init__.py create mode 100644 pyproject.toml delete mode 100644 requirements.txt delete mode 100644 setup.py diff --git a/.gitignore b/.gitignore index d7c2b72..d9e0261 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +*.egg-info *.pyc +.env +.envrc dist -*.egg-info +flake.lock +flake.nix diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..99bebe3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright © 2023 Victor Nakoryakov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 8afbefe..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include README.md -include requirements.txt diff --git a/__init__.py b/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..cf1707e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,40 @@ +[build-system] +# build the package with [flit](https://flit.readthedocs.io) +requires = ["flit_core >=3.4,<4"] +build-backend = "flit_core.buildapi" + +[project] +name = "pyinsales" +version = "1.8.0" +description = """InSales e-commerce platform API bindings""" +authors = [{name = "Victor Nakoryakov", email = "nail.xx@gmail.com"}] +readme = "README.md" +license = {file = "LICENSE"} +classifiers = [ + "Development Status :: 4 - Beta", + "License :: OSI Approved :: MIT License", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Natural Language :: Russian", + "Topic :: Utilities", +] +keywords = ["insales", "API", "bindings"] +requires-python = ">=3.6" +dependencies = [ + "iso8601", +] + +[project.optional-dependencies] +debug = [ + "wdb", +] +release = [ + "flit", +] + +[project.urls] +Homepage = "https://github.com/nailxx/pyinsales" + +[tool.flit.module] +name = "insales" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 57c80f0..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -iso8601 diff --git a/setup.py b/setup.py deleted file mode 100644 index a1357f7..0000000 --- a/setup.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from setuptools import setup - -install_requires = open("requirements.txt").read().split('\n') -with open("README.md", 'rb') as f: - readme_content = f.read().decode('utf-8') - -setup( - name='pyinsales', - version='1.8.0', - description='InSales e-commerce platform API bindings', - long_description=readme_content, - long_description_content_type="text/markdown", - author='Victor Nakoryakov', - author_email='nail.xx@gmail.com', - license='MIT', - keywords="insales API bindings", - url='https://github.com/nailxx/pyinsales', - packages=['insales'], - install_requires=install_requires, - classifiers=[ - "Development Status :: 4 - Beta", - "License :: OSI Approved :: MIT License", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Natural Language :: Russian", - "Topic :: Utilities", - ], -)