-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
mingw-w64-python-sqlmodel/0001-allow-newlest-sqlalchemy.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- sqlmodel/pyproject.toml 2023-06-01 20:59:59.355735600 +0300 | ||
+++ python-build-MINGW32/pyproject.toml 2023-05-31 22:39:38.279909800 +0300 | ||
@@ -32,7 +32,7 @@ | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.7" | ||
-SQLAlchemy = ">=2.0.0,<=2.0.11" | ||
+SQLAlchemy = ">=2.0.0" | ||
pydantic = "^1.8.2" | ||
|
||
[tool.poetry.dev-dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.pro> | ||
|
||
_realname=sqlmodel | ||
pkgbase=mingw-w64-python-${_realname} | ||
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") | ||
pkgver=0.0.8 | ||
pkgrel=1 | ||
pkgdesc='SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness (mingw-w64)' | ||
arch=('any') | ||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') | ||
url='https://github.com/tiangolo/sqlmodel' | ||
license=('MIT') | ||
depends=("${MINGW_PACKAGE_PREFIX}-python" | ||
"${MINGW_PACKAGE_PREFIX}-python-pydantic" | ||
"${MINGW_PACKAGE_PREFIX}-python-sqlalchemy") | ||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build" | ||
"${MINGW_PACKAGE_PREFIX}-python-installer" | ||
"${MINGW_PACKAGE_PREFIX}-python-poetry" | ||
"${MINGW_PACKAGE_PREFIX}-python-wheel" | ||
"git") | ||
#source=("${_realname}-$pkgver.tar.gz::${url}/archive/${pkgver}.tar.gz") | ||
#sha256sums=('85bcd93ede1d3adbbf23b31f0499348343beef03e560a3c75c8e6e1ceaca1768') | ||
|
||
# For more info see https://github.com/tiangolo/sqlmodel/pull/563 | ||
_sqlmodel_revision=4ce8d0720e9d76069257e46c35b1219b8ab72142 | ||
source=("git+https://github.com/farahats9/sqlmodel.git#commit=$_sqlmodel_revision" | ||
'0001-allow-newlest-sqlalchemy.patch') | ||
sha256sums=('SKIP' | ||
'2a0a786bd97d3a49f378173153ba6b36446c8c004f0857aab884c5fe3abd13af') | ||
|
||
prepare() { | ||
#cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" | ||
cp -r "${_realname}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}" | ||
|
||
patch -p1 -i "${srcdir}/0001-allow-newlest-sqlalchemy.patch" | ||
} | ||
|
||
build() { | ||
msg "Python build for ${MSYSTEM}" | ||
cd "${srcdir}/python-build-${MSYSTEM}" | ||
|
||
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation | ||
} | ||
|
||
package() { | ||
cd "${srcdir}/python-build-${MSYSTEM}" | ||
|
||
MSYS2_ARG_CONV_EXCL="--prefix=" \ | ||
"${MINGW_PREFIX}"/bin/python -m installer --prefix=${MINGW_PREFIX} \ | ||
--destdir="${pkgdir}" dist/*.whl | ||
|
||
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE" | ||
} |