freebsd-ports/databases/py-sqlalchemy10/Makefile
Rene Ladan 3d9a815d9c all: remove explicit versions in USES=python for "3.x+"
The logic in USES=python will automatically convert this to 3.8+ by
itself.

Adjust two ports that only had Python 3.7 mentioned but build fine
on Python 3.8 too.

finance/quickfix: mark BROKEN with PYTHON

libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I../.. -I -I. -I.. -I../.. -I../C++ -DLIBICONV_PLUG -DPYTHON_MAJOR_VERSION=3 -Wno-unused-variable -Wno-maybe-uninitialized -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -Wall -ansi -Wno-unused-command-line-argument -Wpointer-arith -Wwrite-strings -Wno-overloaded-virtual -Wno-deprecated-declarations -Wno-deprecated -std=c++0x -MT _quickfix_la-QuickfixPython.lo -MD -MP -MF .deps/_quickfix_la-QuickfixPython.Tpo -c QuickfixPython.cpp  -fPIC -DPIC -o .libs/_quickfix_la-QuickfixPython.o
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
QuickfixPython.cpp:175:11: fatal error: 'Python.h' file not found
          ^~~~~~~~~~
1 warning and 1 error generated.

Reviewed by:	portmgr, vishwin, yuri
Differential Revision:	<https://reviews.freebsd.org/D40568>
2023-06-27 21:34:34 +02:00

63 lines
1.9 KiB
Makefile

PORTNAME= sqlalchemy
PORTVERSION= 1.0.14
CATEGORIES= databases python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
PKGNAMESUFFIX= 10
DISTNAME= SQLAlchemy-${DISTVERSION}
MAINTAINER= m.tsatsenko@gmail.com
COMMENT= Python SQL toolkit and Object Relational Mapper 1.0.x
WWW= https://www.sqlalchemy.org/
LICENSE= MIT
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR}
USES= cpe python
USE_PYTHON= distutils autoplist
PY2TO3_CMD= ${LOCALBASE}/bin/2to3-${PYTHON_VER}
PY2TO3_ARGS= --no-diffs --nobackups --verbose --write
TEST_TARGET= do-test
CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}sqlalchemy[0-9][0-9] # lib/python3.8/site-packages/sqlalchemy/__init__.py
OPTIONS_DEFINE= DOCS EXAMPLES
OPTIONS_MULTI= BACKEND
OPTIONS_MULTI_BACKEND= MSSQL PGSQL SQLITE
OPTIONS_DEFAULT= SQLITE
MSSQL_DESC= MS SQL Server backend
MSSQL_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/pymssql.py:databases/py-pymssql@${PY_FLAVOR}
PGSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}psycopg2>=2.0.8:databases/py-psycopg2@${PY_FLAVOR}
SQLITE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR}
PORTDOCS= *
PORTEXAMPLES= *
pre-build:
@${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/lib
@${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/doc
@${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/examples
# C extensions are not supported with all versions of Python, so ignore
# errors here if there are no .so files to strip.
post-install:
-@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/sqlalchemy/*.so
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
do-test:
${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/test
@(cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)
.include <bsd.port.mk>