Created attachment 226646 [details] fastapi-users.diff QA: * portlint: OK (looks fine.) * testport: OK (poudriere: 13.0, amd64 tested)
Great job Goran. Review items: All *_DEPENDS need to match upstream version specs [1], in this case including the max versions, unless they are patched (patched deps must be tested/confirmed to work with test suites) Painful, but necessary. Please encourage upstreams to distribute (sdist) dependencies of the form >=, so they can develop against, test and fix issues with later versions as early as possible (ideally before users do and are impacted) requires = [ "fastapi >=0.65.2,<0.67.0", "passlib[bcrypt] ==1.7.4", "email-validator >=1.1.0,<1.2", "pyjwt ==2.1.0", "python-multipart ==0.0.5", "makefun >=1.9.2,<1.12", "typing-extensions >=3.7.4.3; python_version < '3.8'", "Deprecated >=1.2.10,<2.0.0" ] [tool.flit.metadata.requires-extra] sqlalchemy = [ "sqlalchemy >=1.3.13,<1.4", "databases >=0.3.0,<0.5", ] mongodb = [ "motor >=2.2.0,<3.0.0", ] tortoise-orm = [ "tortoise-orm >=0.16.0,<0.18.0" ] ormar = [ "ormar >=0.9.5,<0.11.0" ] oauth = [ "httpx-oauth >=0.3,<0.4" ] [1] https://wiki.freebsd.org/Python/PortsPolicy#Dependencies
How do I specify min and max? I tried with this: ${PYTHON_PKGNAMEPREFIX}makefun>=1.11.2,<1.12:devel/py-makefun@${PY_FLAVOR} No luck.
(In reply to Goran Mekić from comment #2) As far as I know both >x,<y and x<y 'work', but there 'may' (still?) be caveats with the first (comma) one, even though its the better syntax. What symptoms do you see with the former?
Created attachment 226710 [details] fastapi-users.diff It works now. No idea what was wrong but I probably made some typo (or I should blame LSD in the water pipes :o). Anyway, here's the revised patch.
Created attachment 226713 [details] fastapi-users.diff Added transient dependency and figured out what was wrong with min,max versions. Max can only have <max, not <=max.
Created attachment 226715 [details] fastapi-users.diff Added optional and transitional dependencies.
Python doesn't need to block / be assignee on new ports
Not sure why i merge-quarterly'd (?) this
Take.
I overlooked bug #254038 isn't ready to land yet. So return assignee to original one.
There appears a more recent version (8.1.3) available. Would you care to update the patch to the latest version?
Created attachment 230587 [details] fastapi-users.diff Although there are newer releases than this one, this is the last release with setup.py. As more and more Python packages are using poetry (https://pypi.org/project/poetry/) I'm guessing we, as FreeBSD community, will have to adopt to it soon(ish), at which point I'll update this port.
Two small comments: - The source archive includes the license file? If so, please set LICENSE_FILE. - WWW in pkg-descr redirects to https://github.com/fastapi-users/fastapi-users, which seems now a canonical one. Could you update the patch accordingly?
Created attachment 230603 [details] fastapi-users.diff Thank you for the feedback, it really means a lot to a novice porter willing to learn!
According to the output from portlint: WARN: Makefile: no port directory /usr/ports/devel/py-makefun found, even though it is listed in RUN_DEPENDS. WARN: Makefile: no port directory /usr/ports/devel/py-asgi-lifespan found, even though it is listed in TEST_DEPENDS. WARN: Makefile: no port directory /usr/ports/www/py-httpx-oauth found, even though it is listed in TEST_DEPENDS. Those are missing in the ports tree. Maybe those ports need to be added before committing this port?
Created attachment 231282 [details] fastapi-users.diff As noted in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257334#c5 I got no response from devel/py-asgi-lifespan team on github. As tests are already disabled for this port I made a comment for the future when asgi-lifespan is in shape.
Created attachment 231304 [details] fastapi-users.diff I sent a PR to upstream to generate setup.py. In the mean time setup.py is generated by "flit build --setup-py" and extracted from there in the form of patch.
Build of one of the dependencies (databases/py-ormar) fails with the following error: =======================<phase: run-depends >============================ ===> py38-ormar-0.10.23 depends on package: py38-databases>=0.3.2,<0.5.4 - not found ===> Installing existing package /packages/All/py38-databases-0.5.5.pkg [r130amd64-tests-job-01] Installing py38-databases-0.5.5... [r130amd64-tests-job-01] `-- Installing py38-aiosqlite-0.17.0... [r130amd64-tests-job-01] | `-- Installing py38-sqlite3-3.8.12_7... [r130amd64-tests-job-01] | `-- Extracting py38-sqlite3-3.8.12_7: ........ done [r130amd64-tests-job-01] `-- Extracting py38-aiosqlite-0.17.0: .......... done [r130amd64-tests-job-01] `-- Installing py38-sqlalchemy14-1.4.31... [r130amd64-tests-job-01] | `-- Installing py38-greenlet-1.1.2... [r130amd64-tests-job-01] | `-- Extracting py38-greenlet-1.1.2: .......... done [r130amd64-tests-job-01] `-- Extracting py38-sqlalchemy14-1.4.31: .......... done [r130amd64-tests-job-01] Extracting py38-databases-0.5.5: .......... done ===> py38-ormar-0.10.23 depends on package: py38-databases>=0.3.2,<0.5.4 - not found *** Error code 1 Stop. make: stopped in /usr/ports/databases/py-ormar Could you review the version range specification?
I forgot a dependent PR, sorry.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=5397c5e80dab3825d0edaa31746adcea47aa361a commit 5397c5e80dab3825d0edaa31746adcea47aa361a Author: Goran Mekić <meka@tilda.center> AuthorDate: 2022-01-29 06:52:38 +0000 Commit: Hiroki Tagato <tagattie@FreeBSD.org> CommitDate: 2022-01-29 06:54:40 +0000 www/py-fastapi-users: add port: Ready-to-use and customizable users management for FastAPI Add quickly a registration and authentication system to your FastAPI project. FastAPI Users is designed to be as customizable and adaptable as possible. Features: * Extensible base user model * Ready-to-use register, login, reset password and verify e-mail routes * Ready-to-use social OAuth2 login flow * Dependency callables to inject current user in route * Pluggable password validation * Customizable database backend * SQLAlchemy async backend included thanks to encode/databases * MongoDB async backend included thanks to mongodb/motor * Tortoise ORM backend included * ormar backend included * Multiple customizable authentication backends * JWT authentication backend included * Cookie authentication backend included * Full OpenAPI schema support, even with several authentication backends WWW: https://github.com/fastapi-users/fastapi-users PR: 257369 Reported by: Goran Mekić <meka@tilda.center> (new maintainer) Reviewed by: koobs www/Makefile | 1 + www/py-fastapi-users/Makefile (new) | 61 +++++++++++++++++++++++++ www/py-fastapi-users/distinfo (new) | 3 ++ www/py-fastapi-users/files/patch-setup.py (new) | 52 +++++++++++++++++++++ www/py-fastapi-users/pkg-descr (new) | 19 ++++++++ 5 files changed, 136 insertions(+)
Committed, thanks!