[arch-commits] Commit in python-fastapi/repos (community-any community-any/PKGBUILD)

Filipe Laíns ffy00 at archlinux.org
Fri May 29 21:49:52 UTC 2020


    Date: Friday, May 29, 2020 @ 21:49:51
  Author: ffy00
Revision: 637300

archrelease: copy trunk to community-any

Added:
  python-fastapi/repos/community-any/
  python-fastapi/repos/community-any/PKGBUILD
    (from rev 637299, python-fastapi/trunk/PKGBUILD)

----------+
 PKGBUILD |   69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

Copied: python-fastapi/repos/community-any/PKGBUILD (from rev 637299, python-fastapi/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2020-05-29 21:49:51 UTC (rev 637300)
@@ -0,0 +1,69 @@
+# Maintainer: Filipe Laíns (FFY00) <lains at archlinux.org>
+
+_pkgname=fastapi
+pkgname=python-$_pkgname
+pkgver=0.55.1
+pkgrel=1
+pkgdesc='FastAPI framework, high performance, easy to learn, fast to code, ready for production'
+arch=('any')
+url='https://github.com/tiangolo/fastapi'
+license=('MIT')
+depends=('python-starlette' 'python-pydantic')
+optdepends=('python-requests' 'python-aiofiles' 'python-jinja' 'python-itsdangerous'
+            'python-yaml' 'python-graphene' 'python-ujson' 'python-orjson'
+            'python-email-validator' 'python-async_generator')
+makedepends=('python-build' 'python-install' 'python-flit')
+# We can't use python-pytest-runner in PEP517 workflows so I am using python-pyproject2setuppy as a workaround
+# Relevant: https://github.com/pytest-dev/pytest/issues/7281
+checkdepends=('python-pytest-runner' 'python-pyproject2setuppy' 'python-pytest-cov' 'mypy'
+              'python-requests' 'python-aiofiles' 'python-jinja' 'python-itsdangerous'
+              'python-yaml' 'python-graphene' 'python-ujson' 'python-orjson'
+              'python-email-validator' 'python-async_generator' 'python-pyjwt'
+              'python-sqlalchemy' 'python-peewee' 'python-flask' 'python-passlib'
+              'python-bcrypt')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
+sha512sums=('2a529f2eafe04ee78e8feb54dd53b36af08ee3c90f06fbb9207c724d52b520c2a3c2ea0db4793a32b45d545aed53d4fb388e0b90364bd4b36dfc4f391d84ca34')
+
+# TODO: package python-multipart
+
+prepare() {
+  cd $_pkgname-$pkgver
+
+  # don't pin starlette dependency
+  sed -i 's|starlette.*"|starlette"|' pyproject.toml
+
+  # needs python-databases
+  rm tests/test_tutorial/test_async_sql_databases/test_tutorial001.py
+
+  # need python-multipart
+  rm tests/test_forms_from_non_typing_sequences.py
+  rm tests/test_security_oauth2{,_optional}.py
+  rm tests/test_tutorial/test_request_files/test_tutorial00{1,2}.py
+  rm tests/test_tutorial/test_request_forms/test_tutorial001.py
+  rm tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py
+  rm tests/test_tutorial/test_security/test_tutorial00{3,5}.py
+}
+
+build() {
+  cd $_pkgname-$pkgver
+
+  python -m build
+  python -m install --cache dist/*.whl
+}
+
+check() {
+  cd $_pkgname-$pkgver
+
+  python -m pyproject2setuppy.main pytest
+
+  mypy -p fastapi
+}
+
+package() {
+  cd $_pkgname-$pkgver
+
+  python -m install --skip-build -d "$pkgdir"
+
+  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+


More information about the arch-commits mailing list