Skip to content

Commit

Permalink
installation: upgrade to setup.cfg
Browse files Browse the repository at this point in the history
* update invenio packages

Co-authored-by: Peter Weber <31234355+rerowep@users.noreply.github.com>
  • Loading branch information
kpsherva and rerowep committed Nov 27, 2023
1 parent c0fecd8 commit 67a20c1
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 135 deletions.
93 changes: 91 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,87 @@
#
# Invenio-Circulation is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
[metadata]
name = invenio-circulation
version = attr: invenio_circulation.__version__
description = Invenio Circulation Module
long_description = file: README.rst, CHANGES.rst
keywords = invenio-circulation Invenio
license = MIT
author = CERN
author_email = info@inveniosoftware.org
platforms = any
url = https://github.com/inveniosoftware/invenio-circulation
classifiers =
Development Status :: 4 - Beta

[aliases]
test = pytest
[options]
include_package_data = True
packages = find:
python_requires = >=3.8
zip_safe = False
install_requires =
Babel>=2.8
arrow>=0.15.0
invenio-base>=1.2.4
invenio-access>=2.0.0
invenio-indexer>=2.0.0
invenio-logging>=2.0.0
invenio-pidstore>=1.3.0
invenio-records-rest>=2.2.0
invenio-jsonschemas>=1.1.4
jsonschema>=3.0.0

[options.extras_require]
tests =
mock>=2.0.0
pytest-invenio>=2.0.0,<2.2.0
pytest-mock>=1.6.0
# Temporary, until fixed in `pytest-invenio`
celery[pytest]>=4.4.0,<5.3
invenio-app>=1.3.1
invenio-jsonschemas>=1.0.1
Flask>=2.2.0,<2.3.0
# due to https://github.com/PyCQA/pydocstyle/issues/620
pydocstyle==6.1.1
sphinx>=5
mysql =
invenio-db[mysql,versioning]>=2.0.0,<3.0.0
postgresql =
invenio-db[postgresql,versioning]>=2.0.0,<3.0.0
sqlite =
invenio-db[versioning]>=2.0.0,<3.0.0
opensearch2 =
invenio-search[opensearch2]>=2.0.0,<3.0.0
elasticsearch7 =
invenio-search[elasticsearch7]>=2.0.0,<3.0.0
# unsupported ES version issue
elasticsearch>=7.0.0,<7.14
docs =
# Kept for backwards compatibility

[options.entry_points]
invenio_base.apps =
invenio_circulation = invenio_circulation:InvenioCirculation
invenio_base.api_apps =
invenio_circulation = invenio_circulation:InvenioCirculation
invenio_base.api_blueprints =
invenio_circulation_loan_actions = invenio_circulation.views:create_loan_actions_blueprint
invenio_circulation_loan_replace_item = invenio_circulation.views:create_loan_replace_item_blueprint
invenio_i18n.translations =
messages = invenio_circulation
invenio_pidstore.fetchers =
loanid = invenio_circulation.pidstore.fetchers:loan_pid_fetcher
invenio_pidstore.minters =
loanid = invenio_circulation.pidstore.minters:loan_pid_minter
invenio_jsonschemas.schemas =
loans = invenio_circulation.schemas
invenio_search.mappings =
loans = invenio_circulation.mappings
invenio_records.jsonresolver =
item_resolver = invenio_circulation.records.jsonresolver.item
patron_resolver = invenio_circulation.records.jsonresolver.patron
document_resolver = invenio_circulation.records.jsonresolver.document

[build_sphinx]
source-dir = docs/
Expand Down Expand Up @@ -40,3 +118,14 @@ output-dir = invenio_circulation/translations/
[update_catalog]
input-file = invenio_circulation/translations/messages.pot
output-dir = invenio_circulation/translations/

[isort]
profile=black

[check-manifest]
ignore =
*-requirements.txt

[tool:pytest]
addopts = --black --isort --pydocstyle --doctest-glob="*.rst" --doctest-modules --cov=invenio_circulation --cov-report=term-missing
testpaths = tests invenio_circulation
135 changes: 2 additions & 133 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,137 +8,6 @@

"""Invenio module for the circulation of bibliographic items."""

import os
from setuptools import setup

from setuptools import find_packages, setup

readme = open("README.rst").read()
history = open("CHANGES.rst").read()

tests_require = [
"mock>=2.0.0",
"pytest-invenio>=1.4.1,<1.5.0",
"pytest-mock>=1.6.0",
"celery[pytest]>=4.4.0,<5.1", # Temporary, until fixed in `pytest-invenio`
"invenio-app>=1.3.1",
"invenio-jsonschemas>=1.0.1",
"Flask>=1.1.0,<2.0.0",
]

invenio_db_version = "1.0.9,<1.1.0"
invenio_search_version = "1.4.0,<1.5.0"

extras_require = {
"elasticsearch7": [
"invenio-search[elasticsearch7]>={}".format(invenio_search_version),
# unsupported ES version issue
"elasticsearch>=7.0.0,<7.14",
],
"docs": [
"Sphinx>=4.2.0",
],
"mysql": ["invenio-db[mysql,versioning]>={}".format(invenio_db_version)],
"postgresql": [
"invenio-db[postgresql,versioning]>={}".format(invenio_db_version)
],
"sqlite": ["invenio-db[versioning]>={}".format(invenio_db_version)],
"tests": tests_require,
}

extras_require["all"] = []
for name, reqs in extras_require.items():
if name in (
"mysql",
"postgresql",
"sqlite",
"elasticsearch7",
):
continue
extras_require["all"].extend(reqs)

setup_requires = ["Babel>=2.8"]

install_requires = [
"arrow>=0.15.0",
"invenio-base>=1.2.4",
"invenio-access>=1.3.1",
"invenio-indexer>=1.3.0,<1.4.0",
"invenio-logging>=1.2.1",
"invenio-pidstore>=1.1.0",
"invenio-records-rest>=1.6.4",
"invenio-jsonschemas>=1.0.1",
"jsonschema>=3.0.0,<4.0.0",
]

packages = find_packages()


# Get the version string. Cannot be done with import!
g = {}
with open(os.path.join("invenio_circulation", "version.py"), "rt") as fp:
exec(fp.read(), g)
version = g["__version__"]

setup(
name="invenio-circulation",
version=version,
description=__doc__,
long_description=readme + "\n\n" + history,
keywords="invenio",
license="MIT",
author="CERN",
author_email="info@inveniosoftware.org",
url="https://github.com/inveniosoftware/invenio-circulation",
packages=packages,
zip_safe=False,
include_package_data=True,
platforms="any",
python_requires=">=3",
entry_points={
"invenio_base.apps": [
"invenio_circulation = invenio_circulation:InvenioCirculation"
],
"invenio_base.api_apps": [
"invenio_circulation = invenio_circulation:InvenioCirculation"
],
"invenio_base.api_blueprints": [
"invenio_circulation_loan_actions = "
"invenio_circulation.views:create_loan_actions_blueprint",
"invenio_circulation_loan_replace_item = "
"invenio_circulation.views:create_loan_replace_item_blueprint",
],
"invenio_i18n.translations": ["messages = invenio_circulation"],
"invenio_pidstore.fetchers": [
"loanid = invenio_circulation.pidstore.fetchers:loan_pid_fetcher"
],
"invenio_pidstore.minters": [
"loanid = invenio_circulation.pidstore.minters:loan_pid_minter"
],
"invenio_jsonschemas.schemas": ["loans = invenio_circulation.schemas"],
"invenio_search.mappings": ["loans = invenio_circulation.mappings"],
"invenio_records.jsonresolver": [
"item_resolver = invenio_circulation.records.jsonresolver.item",
"patron_resolver = invenio_circulation.records.jsonresolver.patron",
"document_resolver = invenio_circulation.records.jsonresolver.document",
],
},
extras_require=extras_require,
install_requires=install_requires,
setup_requires=setup_requires,
tests_require=tests_require,
classifiers=[
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Development Status :: 1 - Planning",
],
)
setup()

0 comments on commit 67a20c1

Please sign in to comment.