ports/databases/pyspatialite/files/patch-setup.py
Kubilay Kocak 987822f409 database/pyspatialite: Modernize before setuptools update
Modernize in preparation for a pending setuptools update which
identified this port as failing during an exp-run [1].

- Use canonical CHEESESHOP master site
- Use autoplist & concurrent
- Remove pkg-plist accordingly
- Remove PYDISTUTILS_PKGNAME and WRKSRC overrides
- Stop package from adding empty directory to --record (and therefore
  pkg-plist) output

While I'm here:

- Add LICENSE and LICENSE_FILE
- Strip shared library
- Re-patch patches according to makepatch
- Remove spurious whitespace

[1] https://reviews.freebsd.org/D2704

Approved by:	python, portmgr (exp-run)
2015-06-12 11:12:29 +00:00

46 lines
1.9 KiB
Python

--- setup.py.orig 2013-11-22 19:17:22 UTC
+++ setup.py
@@ -65,8 +65,6 @@ class DocBuilder(Command):
if rc != 0:
print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."
-AMALGAMATION_ROOT = "amalgamation/libspatialite-amalgamation-3.0.1"
-
TRUTHY = ("yes", "true", "t", "1")
class HeaderNotFoundException(Exception):
@@ -220,12 +218,11 @@ def get_setup_args():
print "Fatal error: PYSPATIALITE_VERSION could not be detected!"
sys.exit(1)
- data_files = [("pyspatialite-doc",
+ data_files = [("/usr/local/share/doc/pyspatialite",
glob.glob("doc/*.html") \
+ glob.glob("doc/*.txt") \
+ glob.glob("doc/*.css")),
- ("pyspatialite-doc/code",
- glob.glob("doc/code/*.py"))]
+ ]
py_modules = ["spatialite"]
setup_args = dict(
@@ -259,11 +256,8 @@ def get_setup_args():
"src/statement.c",
"src/util.c",
"src/row.c",
- os.path.join(AMALGAMATION_ROOT, "sqlite3.c"),
- os.path.join(AMALGAMATION_ROOT, "spatialite.c")
],
include_dirs = [
- os.path.join(AMALGAMATION_ROOT,"headers")
],
library_dirs = [],
runtime_library_dirs = [],
@@ -272,7 +266,6 @@ def get_setup_args():
("VERSION",'"%s"' % PYSPATIALITE_VERSION),
("SQLITE_ENABLE_RTREE", "1"), # build with fulltext search enabled
("NDEBUG","1"),
- ("SPL_AMALGAMATION","1"),
('MODULE_NAME', '\\"spatialite.dbapi2\\"') if sys.platform == "win32" else ('MODULE_NAME', '"spatialite.dbapi2"')
],
)