aboutsummaryrefslogtreecommitdiff
path: root/databases/py-apsw
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-11-14 16:40:18 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-11-14 17:15:51 +0000
commitefa2ecc8cb2df32980ee1ab1780811958941ee57 (patch)
treecc44c3c82717448172eb9c546ecceda652efbe42 /databases/py-apsw
parent53b6ca1dcf28d4e9173dcc0fbe4d469c6046fec7 (diff)
downloadports-efa2ecc8cb2df32980ee1ab1780811958941ee57.tar.gz
ports-efa2ecc8cb2df32980ee1ab1780811958941ee57.zip
databases/py-apsw: Convert to USE_PYTHON=pep517
- Remove EXTENSION option - Remove patch-setup.py The patch to avoid downloading sqlite is no longer needed after we changed to use sqlite from ports tree in 1f3518399e2a82b37713b6b1c74101028e2873f4. - Bump PORTREVISION for package change Helped by: Roger Binns <rogerb@rogerbinns.com> (author, via private mail)
Diffstat (limited to 'databases/py-apsw')
-rw-r--r--databases/py-apsw/Makefile13
-rw-r--r--databases/py-apsw/files/patch-setup.py47
2 files changed, 5 insertions, 55 deletions
diff --git a/databases/py-apsw/Makefile b/databases/py-apsw/Makefile
index d287dcc1a4a8..32ea37d81722 100644
--- a/databases/py-apsw/Makefile
+++ b/databases/py-apsw/Makefile
@@ -1,5 +1,6 @@
PORTNAME= apsw
PORTVERSION= 3.43.2.0
+PORTREVISION= 1
CATEGORIES= databases python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -12,18 +13,14 @@ WWW= https://rogerbinns.github.io/apsw/ \
LICENSE= ZLIB
LICENSE_FILE= ${WRKSRC}/LICENSE
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+
USES= localbase python sqlite
-USE_PYTHON= autoplist concurrent distutils unittest
+USE_PYTHON= autoplist concurrent pep517 unittest
TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR}
-OPTIONS_DEFINE= EXTENSION
-OPTIONS_DEFAULT=EXTENSION
-EXTENSION_DESC= Allow loadable extensions
-
-EXTENSION_VARS= PYDISTUTILS_BUILDARGS+=--enable=load_extension
-EXTENSION_VARS_OFF= PYDISTUTILS_BUILDARGS+=--omit=load_extension
-
post-patch:
@${PRINTF} '[build_ext]\nuse_system_sqlite_config = True\n' > ${WRKSRC}/setup.apsw
diff --git a/databases/py-apsw/files/patch-setup.py b/databases/py-apsw/files/patch-setup.py
deleted file mode 100644
index a0438d426cc6..000000000000
--- a/databases/py-apsw/files/patch-setup.py
+++ /dev/null
@@ -1,47 +0,0 @@
---- setup.py.orig 2023-07-25 19:42:08 UTC
-+++ setup.py
-@@ -260,43 +260,7 @@ class fetch(Command):
- if self.sqlite:
- write(" Getting the SQLite amalgamation")
-
-- AURL = "https://sqlite.org/sqlite-autoconf-%s.tar.gz" % (self.webversion, )
--
-- AURL = fixup_download_url(AURL)
--
-- data = self.download(AURL, checksum=True)
--
-- # we need to run configure to get various -DHAVE_foo flags on non-windows platforms
-- # delete existing sqlite3 directory if it exists, but save sqlite3config.h if it exists
-- sqlite3config_h = None
-- if os.path.exists("sqlite3/sqlite3config.h"):
-- sqlite3config_h = read_whole_file("sqlite3/sqlite3config.h", "rt")
-- if os.path.exists('sqlite3'):
-- for dirpath, dirnames, filenames in os.walk('sqlite3', topdown=False):
-- for file in filenames:
-- os.remove(os.path.join(dirpath, file))
-- for dir in dirnames:
-- os.rmdir(os.path.join(dirpath, dir))
-- os.rmdir('sqlite3')
-- # if you get an exception here it is likely that you don't have the python zlib module
-- import zlib
-- tar = tarfile.open("nonexistentname to keep old python happy", 'r', data)
-- configmember = None
-- kwargs = {}
-- if sys.version_info >= (3, 11, 4):
-- kwargs["filter"] = "tar"
-- for member in tar.getmembers():
-- tar.extract(member, **kwargs)
-- # find first file named configure
-- if not configmember and member.name.endswith("/configure"):
-- configmember = member
-- tar.close()
-- # the directory name has changed a bit with each release so try to work out what it is
-- if not configmember:
-- write("Unable to determine directory it extracted to.", dest=sys.stderr)
-- sys.exit(19)
-- dirname = configmember.name.split('/')[0]
-- os.rename(dirname, 'sqlite3')
-+ dirname = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'sqlite3')
- if sys.platform != "win32":
- os.chdir('sqlite3')
- write(" Running configure to work out SQLite compilation flags")