ports/graphics/py-pygraphviz/files/patch-setup.py
Kubilay Kocak 275db1ead5 graphics/py-graphviz: Move to py-pygraphviz, Fix 3.x build
There are numerous graphviz related packages in PyPI, including:
graphviz, graphviz-python and pygraphviz.

This port, py-graphviz, is not and does not provide the same package
as the 'graphviz' package on PyPI (CHEESESHOP).

Further, it blocks the creation of a correctly named py-graphviz port,
is a POLA violation in terms of users expecting to find and recieve
the package they expect based on a standard search, and is likely to
create confusion among other ports if they depend on a python graphviz
package, which could result in incorrect packages/dependencies.

This is why among other reasons, Python packages should be named
exactly what they are called in PyPI, or inside install_requires,
setup_requires or tests_requires as dependencies in other packages.

This change moves py-graphviz to py-pygraphviz to correct the above
incorrect naming.

While I'm here:

- Remove backup (http) MASTER_SITES, CHEESESHOP is highly-available
  and provides a Geo-aware CDN by Fastly.
- Remove {BUILD,RUN}_DEPENDS in favour of the actual LIB_DEPENDS
- Use PYDISTUTILS_* framework variables to customise the build instead
  of hack patching setup.py
- Enable autoplist, fixing builds on Python 3.x [1]
- Enable concurrent (Python version) installation
  - Hack patch setup.py to preclude docs installation, as it adds a
    directory to --record and breaks pkg-plist output [2]
- Remove DOCSDIR override (no longer necessary)
- Assign MAINTAINER'ship to python@
- Add TEST_DEPENDS and test target
- pkg-descr: Match WWW URL to setup.py:homepage field
- pkg-descr: Improve package description text (matching upstream)

While I'm sweeping dependencies:

- Fix a typo in science/gramps: s|>-|>=

[2] https://wiki.freebsd.org/Python (Open task for install_data bug)

Reported by:	Ben Woods (via IRC) [1]
2016-02-07 09:44:24 +00:00

32 lines
1.1 KiB
Python

--- setup.py.orig 2016-02-07 08:48:26 UTC
+++ setup.py
@@ -36,14 +36,6 @@ release.write_versionfile()
sys.path.pop(0)
packages = ["pygraphviz", "pygraphviz.tests"]
-docdirbase = 'share/doc/pygraphviz-%s' % release.version
-data = [
- (docdirbase, glob("*.txt")),
- (os.path.join(docdirbase, 'examples'), glob("examples/*.py")),
- (os.path.join(docdirbase, 'examples'), glob("examples/*.dat")),
- (os.path.join(docdirbase, 'examples'), glob("examples/*.dat.gz")),
-]
-package_data = {'': ['*.txt'], }
if __name__ == "__main__":
define_macros = []
@@ -75,14 +67,11 @@ if __name__ == "__main__":
download_url=release.download_url,
classifiers=release.classifiers,
packages=packages,
- data_files=data,
ext_modules=extension,
cmdclass={
'install': AddExtensionInstallCommand,
'develop': AddExtensionDevelopCommand,
},
- package_data=package_data,
- include_package_data = True,
test_suite='nose.collector',
tests_require=['nose>=0.10.1', 'doctest-ignore-unicode>=0.1.0',],
)