From c6407131c23464be9f7353b797283da94bb95a7d Mon Sep 17 00:00:00 2001 From: Enric Morales Date: Thu, 14 Mar 2024 00:00:30 +0100 Subject: [PATCH 1/3] build: use pyproject.toml --- pyproject.toml | 61 ++++++++++++++++++++++++++++++++++++++++++++ setup.py | 68 -------------------------------------------------- 2 files changed, 61 insertions(+), 68 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..fc4add4 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,61 @@ +[build-system] +build-backend = "setuptools.build_meta" +requires = [ + "setuptools>=65", + "wheel", +] + +[project] +name = "papis-zotero" +description = "Interact with Zotero using papis" +version = "0.1.2" +authors = [{ name = "Alejandro Gallo", email = "aamsgallo@gmail.com" }] +maintainers = [{ name = "Alejandro Gallo", email = "aamsgallo@gmail.com" }] +readme = "README.rst" +license = { text = "GPLv3" } +classifiers = [ + "Environment :: Console :: Curses", + "Environment :: Console", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Operating System :: MacOS", + "Operating System :: Microsoft", + "Operating System :: OS Independent", + "Operating System :: POSIX", + "Operating System :: Unix", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Utilities", +] +keywords = ["bibtex", "biliography", "cli", "management", "papis", "zotero"] +dependencies = ["papis==0.13"] + +[project.urls] +Repository = "https://github.com/papis/papis-zotero" + +[project.optional-dependencies] +"develop" = [ + "flake8", + "flake8-bugbear", + "flake8-quotes", + "mypy>=0.7", + "pep8-naming", + "pytest", + "pytest-cov", + "python-coveralls", + "types-PyYAML", + "types-tqdm", +] + +[project.entry-points."papis.command"] +"zotero" = "papis_zotero:main" + +[tool.setuptools] +packages = ["papis_zotero"] diff --git a/setup.py b/setup.py deleted file mode 100644 index 46b3590..0000000 --- a/setup.py +++ /dev/null @@ -1,68 +0,0 @@ -from setuptools import setup - -with open("README.rst") as fd: - long_description = fd.read() - -setup( - name="papis-zotero", - version="0.1.2", - author="Alejandro Gallo", - author_email="aamsgallo@gmail.com", - license="GPLv3", - url="https://github.com/papis/papis-zotero", - install_requires=[ - "papis==0.13", - ], - classifiers=[ - "Environment :: Console :: Curses", - "Environment :: Console", - "Intended Audience :: Developers", - "Intended Audience :: Education", - "Intended Audience :: Science/Research", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", - "Operating System :: MacOS", - "Operating System :: Microsoft", - "Operating System :: OS Independent", - "Operating System :: POSIX", - "Operating System :: Unix", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Topic :: Utilities", - ], - description="Interact with Zotero using papis", - long_description=long_description, - keywords=[ - "bibtex", - "biliography", - "cli", - "management", - "papis", - "zotero", - ], - extras_require={ - "develop": [ - "flake8", - "flake8-bugbear", - "flake8-quotes", - "mypy>=0.7", - "pep8-naming", - "pytest", - "pytest-cov", - "python-coveralls", - "types-PyYAML", - "types-tqdm", - ] - }, - entry_points={ - "papis.command": [ - "zotero=papis_zotero:main" - ] - }, - packages=["papis_zotero"], - platforms=["linux", "osx", "win32"], -) From 56c7f6df9f725700d4e314c75178a3696cc97140 Mon Sep 17 00:00:00 2001 From: Enric Morales Date: Mon, 18 Mar 2024 11:25:38 +0100 Subject: [PATCH 2/3] build: change build backend to hatchling, same as papis --- pyproject.toml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fc4add4..885e7e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,6 @@ [build-system] -build-backend = "setuptools.build_meta" -requires = [ - "setuptools>=65", - "wheel", -] +build-backend = "hatchling.build" +requires = ["hatchling>=1.10.0"] [project] name = "papis-zotero" @@ -55,7 +52,4 @@ Repository = "https://github.com/papis/papis-zotero" ] [project.entry-points."papis.command"] -"zotero" = "papis_zotero:main" - -[tool.setuptools] -packages = ["papis_zotero"] +"zotero" = "papis_zotero:main" \ No newline at end of file From c7a09a23be3ee1096c13c44ecdbdbc7f248d9c46 Mon Sep 17 00:00:00 2001 From: Enric Morales Date: Mon, 18 Mar 2024 11:43:23 +0100 Subject: [PATCH 3/3] build: move tool configs to pyproject.toml --- pyproject.toml | 24 +++++++++++++++++++++++- setup.cfg | 24 ------------------------ 2 files changed, 23 insertions(+), 25 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index 885e7e1..0b933a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,7 @@ Repository = "https://github.com/papis/papis-zotero" "flake8", "flake8-bugbear", "flake8-quotes", + "Flake8-pyproject", "mypy>=0.7", "pep8-naming", "pytest", @@ -52,4 +53,25 @@ Repository = "https://github.com/papis/papis-zotero" ] [project.entry-points."papis.command"] -"zotero" = "papis_zotero:main" \ No newline at end of file +"zotero" = "papis_zotero:main" + +[tool.flake8] +select = ["B", "D", "E", "F", "N", "Q", "W"] +extend-ignore = ["B019", "E123", "N818", "W503"] +max-line-length = 88 +inline-quotes = "double" +multiline-quotes = "double" + +[tool.pytest.ini_options] +norecursedirs = ".git doc build dist" +python_files = "*.py" +markers = ["config_setup: setup for tmp_config", + "library_setup: setup for tmp_library", +] + +[tool.mypy] +strict = true +show_column_numbers = true +hide_error_codes = false +pretty = true +warn_unused_ignores = false diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 7adeddc..0000000 --- a/setup.cfg +++ /dev/null @@ -1,24 +0,0 @@ -[flake8] -select = B, D, E, F, N, Q, W -extend-ignore = B019, E123, N818, W503 - -max-line-length = 88 -inline-quotes = double -multiline-quotes = double - -[tool:pytest] -norecursedirs = .git doc build dist -python_files = *.py -markers = - config_setup: setup for tmp_config - library_setup: setup for tmp_library - -[mypy] -strict = True -show_column_numbers = True -hide_error_codes = False -pretty = True -warn_unused_ignores = False - -[mypy-colorama.*] -ignore_missing_imports = True