Bug 257313 - [NEW PORT] databases/py-databases: Async database support for Python
Summary: [NEW PORT] databases/py-databases: Async database support for Python
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Hiroki Tagato
URL:
Keywords: feature, needs-qa
Depends on: 257332
Blocks: 257315 257370
  Show dependency treegraph
 
Reported: 2021-07-21 14:52 UTC by Goran Mekić
Modified: 2021-12-30 02:59 UTC (History)
4 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
databases.diff (3.18 KB, patch)
2021-07-21 14:52 UTC, Goran Mekić
no flags Details | Diff
databases.diff (3.76 KB, patch)
2021-07-21 15:39 UTC, Goran Mekić
no flags Details | Diff
databases.diff (4.00 KB, patch)
2021-07-22 12:05 UTC, Goran Mekić
no flags Details | Diff
databases.diff (4.05 KB, patch)
2021-12-26 10:18 UTC, Goran Mekić
meka: maintainer-approval+
Details | Diff
databases.diff (3.94 KB, patch)
2021-12-29 09:23 UTC, Goran Mekić
meka: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Goran Mekić 2021-07-21 14:52:47 UTC
Created attachment 226593 [details]
databases.diff

QA:

  * portlint: OK (looks fine.)
  * testport: OK (poudriere: 13.0, amd64 tested)
  * maketest: OK (57 passed, 4 skipped, 1 warnings)
Comment 1 Goran Mekić 2021-07-21 15:02:18 UTC
When defined, LICENSE_FILE will cause LICENSE.md to be copied to /usr/local. I though we should always put that variable in Makefile of the port. Of course, once removed, everything is just fine. What should I do for this port and for any other in case license is standard (in this case BSD3CLAUSE) and when it's non-standard one? Of course, I will adjust this port based on the feedback. Thank you!
Comment 2 Goran Mekić 2021-07-21 15:39:01 UTC
Created attachment 226594 [details]
databases.diff

The setup.py was "funky" and it's the cause why LICENSE.md was installed to /usr/local which is fixed by a patch file now.
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-22 01:39:21 UTC
Python ports should match their upstream python_requires / *_requires as closely as possible (modulo limitations of our <version-spec>):

setup.py:
    ...
    python_requires='>=3.6',
    ...
    install_requires=['sqlalchemy<1.4', 'aiocontextvars;python_version<"3.7"'],
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-22 01:40:10 UTC
@Goran You may also want to consider grouping those options up into a DATABASE group, with group description "Database Support"
Comment 5 Goran Mekić 2021-07-22 12:05:21 UTC
Created attachment 226607 [details]
databases.diff
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-28 02:20:11 UTC
Python doesn't need to block / be assignee on new ports
Comment 7 Hiroki Tagato freebsd_committer freebsd_triage 2021-12-26 03:12:30 UTC
There appears a more recent version (0.5.3) released. Would you care to update the patch to the latest version?
Comment 8 Goran Mekić 2021-12-26 10:18:07 UTC
Created attachment 230417 [details]
databases.diff

Patch updated to 0.5.3
Comment 9 Hiroki Tagato freebsd_committer freebsd_triage 2021-12-26 13:12:06 UTC
Thanks for updating the patch. Here are some comments:

- Both MASTER_SITE=CHEESESHOP and USE_GITHUB=yes are specified. Which one is really needed?
- Does the source archive include a license file? If so, please specify LICENSE_FILE.
- MYSQL_DESC, PGSQL_DESC, and SQLITE_DESC seem unnecessary since they are already defined in bsd.options.desc.mk.

Could you update the patch to accomdate those comments?

Thanks!
Comment 10 Goran Mekić 2021-12-29 09:23:34 UTC
Created attachment 230531 [details]
databases.diff

I commented out tests as they are failing in a dependent library. The error is that pymysql.util does not exist any more, yet some library is importing it.
Comment 11 commit-hook freebsd_committer freebsd_triage 2021-12-30 02:59:21 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d025e5c68e7e9a9634fc8f2dc3d7ba129c148d20

commit d025e5c68e7e9a9634fc8f2dc3d7ba129c148d20
Author:     Goran Mekić <meka@tilda.center>
AuthorDate: 2021-12-30 02:19:13 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2021-12-30 02:58:27 +0000

    databases/py-databases: add port: Async database support for Python

    Databases gives you simple asyncio support for a range of databases.

    It allows you to make queries using the powerful SQLAlchemy Core expression
    language, and provides support for PostgreSQL, MySQL, and SQLite.

    Databases is suitable for integrating against any async Web framework, such as
    Starlette, Sanic, Responder, Quart, aiohttp, Tornado, or FastAPI.

    WWW: https://github.com/encode/databases

    PR:             257313
    Reported by:    Goran Mekić <meka@tilda.center> (new maintainer)
    Reviewed by:    koobs

 databases/Makefile                                |  1 +
 databases/py-databases/Makefile (new)             | 51 +++++++++++++++++++++++
 databases/py-databases/distinfo (new)             |  3 ++
 databases/py-databases/files/patch-setup.py (new) | 11 +++++
 databases/py-databases/pkg-descr (new)            |  9 ++++
 5 files changed, 75 insertions(+)
Comment 12 Hiroki Tagato freebsd_committer freebsd_triage 2021-12-30 02:59:58 UTC
Committed, thanks!