diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6ae84d8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,35 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "project_name" +version = "0.1.0" +description = "project_description" +readme = "README.md" +requires-python = ">=3.6" +authors = [ + { name = "author_name", email = "author_email@exemplo.com" } +] +homepage = "https://github.com/author_name/project_urlname/" + +# Dependências de produção (adicione suas dependências aqui quando necessário) +dependencies = [] + +# Scripts de entrada +[project.scripts] +project_name = "project_name.__main__:main" + +# Dependências opcionais para desenvolvimento e testes +[project.optional-dependencies] +test = [ + "pip-tools", + "pytest", + "coverage", + "flake8", + "black", + "isort", + "pytest-cov", + "mypy", + "gitchangelog", +] diff --git a/requirements-test.txt b/requirements-test.txt deleted file mode 100644 index e89ee5c..0000000 --- a/requirements-test.txt +++ /dev/null @@ -1,10 +0,0 @@ -# These requirements are for development and testing only, not for production. -pytest -coverage -flake8 -black -isort -pytest-cov -mypy -gitchangelog -mkdocs diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index b05f2a6..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -# This template is a low-dependency template. -# By default there is no requirements added here. -# Add the requirements you need to this file. -# or run `make init` to create this file automatically based on the template. -# You can also run `make switch-to-poetry` to use the poetry package manager. diff --git a/setup.py b/setup.py deleted file mode 100644 index 7547627..0000000 --- a/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -"""Python setup.py for project_name package""" -import io -import os -from setuptools import find_packages, setup - - -def read(*paths, **kwargs): - """Read the contents of a text file safely. - >>> read("project_name", "VERSION") - '0.1.0' - >>> read("README.md") - ... - """ - - content = "" - with io.open( - os.path.join(os.path.dirname(__file__), *paths), - encoding=kwargs.get("encoding", "utf8"), - ) as open_file: - content = open_file.read().strip() - return content - - -def read_requirements(path): - return [ - line.strip() - for line in read(path).split("\n") - if not line.startswith(('"', "#", "-", "git+")) - ] - - -setup( - name="project_name", - version=read("project_name", "VERSION"), - description="project_description", - url="https://github.com/author_name/project_urlname/", - long_description=read("README.md"), - long_description_content_type="text/markdown", - author="author_name", - packages=find_packages(exclude=["tests", ".github"]), - install_requires=read_requirements("requirements.txt"), - entry_points={ - "console_scripts": ["project_name = project_name.__main__:main"] - }, - extras_require={"test": read_requirements("requirements-test.txt")}, -)