Skip to content

Commit

Permalink
feat: switch to setuptools to install local package
Browse files Browse the repository at this point in the history
  • Loading branch information
martibosch committed Sep 8, 2023
1 parent 565c88f commit c5cd854
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
1 change: 1 addition & 0 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"python_version": "3.10",
"author_name": "Martí Bosch",
"github_username": "martibosch",
"email": "marti.bosch@epfl.ch",
"description": "A short description of the project."
}
39 changes: 25 additions & 14 deletions {{ cookiecutter.repo_name }}/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "{{ cookiecutter.repo_name }}"
version = "0.1.0"
description = "{{ cookiecutter.description }}"
authors = [{ name = "{{ cookiecutter.author_name }}", email = "{{ cookiecutter.email }}" }]
readme = "README.md"
license = { text = "GPL-3.0-only" }
classifiers = [
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
requires-python = ">=3.8"

[project.urls]
Repository = "https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}"

[tool.setuptools.packages.find]
include = ["{{ cookiecutter.python_module_name }}", "{{ cookiecutter.python_module_name }}.*"]

[tool.black]
line-length = 88
Expand All @@ -15,15 +38,3 @@ known-first-party = ["{{ cookiecutter.python_module_name }}"]
[tool.nbqa.addopts]
# ignore documentation errors in notebooks
ruff = ["--ignore=D"]

[tool.poetry]
name = "{{ cookiecutter.repo_name }}"
version = "0.1.0"
description = "{{ cookiecutter.description }}"
license = "GPL-3.0"
authors = [
"{{ cookiecutter.author_name }}",
]
packages = [
{ include = "{{ cookiecutter.python_module_name }}" },
]

0 comments on commit c5cd854

Please sign in to comment.