1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- Enable stagedir support

- Remove easy_install dependency
- Convert to PYDISTUTILS_AUTOPLIST
- Bump PORTREVISION to enforce a cleanup for the easy_install references

With hat:	python@
Approved by:	portmgr (implicit)
This commit is contained in:
Marcus von Appen 2014-06-19 13:12:47 +00:00
parent 4b644fe08e
commit 9deffedb6b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=358407
3 changed files with 8 additions and 1533 deletions

View File

@ -3,10 +3,10 @@
PORTNAME= pyjamas
PORTVERSION= 0.5
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= www python
MASTER_SITES= SF/${PORTNAME}/OldFiles
DISTNAME= ${PYDISTUTILS_PKGNAME}-${PORTVERSION}
DISTNAME= Pyjamas-${PORTVERSION}
MAINTAINER= nivit@FreeBSD.org
COMMENT= A port of Google Web Toolkit to Python
@ -14,26 +14,18 @@ COMMENT= A port of Google Web Toolkit to Python
USE_PYTHON= yes
# install/require some libraries in sys.prefix
USE_PYTHON_PREFIX= yes
USE_PYDISTUTILS= easy_install
PYDISTUTILS_PKGNAME= Pyjamas
USE_PYDISTUTILS= yes
PYDISTUTILS_AUTOPLIST= yes
REINPLACE_ARGS= -i '' -e 's,../../bin,${PREFIX}/bin,'
NO_STAGE= yes
post-patch:
@${REINPLACE_CMD} -e 's|/usr/share/pyjamas|${DATADIR}|' ${WRKSRC}/setup.py
${FIND} ${WRKSRC}/examples -type f -name "build.sh" -print0 | ${XARGS} -0 ${REINPLACE_CMD}
post-install:
.if !defined(NOPORTEXAMPLES)
${MV} ${PYTHONPREFIX_SITELIBDIR}/${PYEASYINSTALL_EGG}/share/pyjamas/examples ${EXAMPLESDIR}
.endif
${MV} ${PYTHONPREFIX_SITELIBDIR}/${PYEASYINSTALL_EGG}/share/pyjamas ${DATADIR}
${RMDIR} ${PYTHONPREFIX_SITELIBDIR}/${PYEASYINSTALL_EGG}/share
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}/img
cd ${WRKSRC}/doc && ${CP} *.html ${DOCSDIR} && ${CP} img/* ${DOCSDIR}/img
.endif
${MKDIR} ${STAGEDIR}${DOCSDIR}/img
cd ${WRKSRC}/doc && ${CP} *.html ${STAGEDIR}${DOCSDIR} && \
${CP} img/* ${STAGEDIR}${DOCSDIR}/img
.include <bsd.port.mk>

View File

@ -1,107 +0,0 @@
--- setup.py 2009-03-12 11:30:01.000000000 +0100
+++ setup.py.port 2009-03-16 22:25:32.000000000 +0100
@@ -8,6 +8,7 @@
import glob
from setuptools import setup, find_packages
from setuptools.command import test
+from setuptools.command.install import install
import sys
import os
@@ -17,27 +18,27 @@
keyw = """\
"""
-lib_data_files = glob.glob("library/*.py")
-lib_ui_data_files = glob.glob("library/ui/*.py")
-bp_data_files = glob.glob("builder/boilerplate/*")
-test_files = glob.glob("pyjs/tests/*")
-stub_files = glob.glob("stubs/*")
-lib_data_files += glob.glob("library/*.js")
-builtin_data_files = glob.glob("library/builtins/*.py")
-platform_data_files = glob.glob("library/platform/*.py")
-pyjamas_data_files = glob.glob("library/pyjamas/*.py")
-addons_data_files = glob.glob("addons/*.py")
-
-data_files = [("/usr/share/pyjamas/library", lib_data_files),
- ("/usr/share/pyjamas/library/builtins", builtin_data_files),
- ("/usr/share/pyjamas/library/ui", lib_ui_data_files),
- ("/usr/share/pyjamas/builder/boilerplate", bp_data_files),
- ("/usr/share/pyjamas/pyjs/tests", test_files),
- ("/usr/share/pyjamas/stubs", stub_files),
- ("/usr/share/pyjamas/library/platform", platform_data_files),
- ("/usr/share/pyjamas/library/pyjamas", pyjamas_data_files),
- ("/usr/share/pyjamas/addons", addons_data_files)
- ]
+# yuk, spew, hurl. but it works. anyone got any better ideas?
+if sys.platform == "win32" or sys.platform.startswith("freebsd"):
+ datadir = os.path.join("share", "pyjamas")
+else:
+ # last thing we want on unix systems is the data files ending
+ # up in a random egg subdirectory, where no-one can find them.
+ # windows platform, i couldn't care less where they end up but
+ # it musn't be a fixed path, it must be a relative path.
+ datadir = "/usr/share/pyjamas"
+
+bp_data_files = glob.glob(os.path.join("builder", "boilerplate", "*"))
+test_files = glob.glob(os.path.join("pyjs", "tests", "*"))
+stub_files = glob.glob(os.path.join("stubs", "*"))
+addons_data_files = glob.glob(os.path.join("addons", "*.py"))
+
+data_files = [
+ (os.path.join(datadir, "builder", "boilerplate"), bp_data_files),
+ (os.path.join(datadir, "pyjs", "tests"), test_files),
+ (os.path.join(datadir, "stubs"), stub_files),
+ (os.path.join(datadir, "addons"), addons_data_files)
+]
# main purpose of this function is to exclude "output" which
# could have been built by a developer.
@@ -52,21 +53,28 @@
if fname[-4:] == ".pyc": # ehmm.. noooo.
continue
if os.path.isdir(p):
- res += get_files(p)
+ get_dir(p)
else:
res.append(p)
return res
-# ok - examples is a bit of a pain.
-for d in glob.glob("examples/*"):
- if os.path.isdir(d):
- (pth, fname) = os.path.split(d)
- expath = get_files(d)
- pth = os.path.join("/usr/share/pyjamas/examples", fname)
- #print pth, expath
- data_files.append((pth, expath))
- else:
- data_files.append(("/usr/share/pyjamas/examples", [d]))
+def get_dir(dirname):
+ for d in glob.glob("%s/*" % dirname):
+ if os.path.isdir(d):
+ (pth, fname) = os.path.split(d)
+ expath = get_files(d)
+ pth = os.path.join(os.path.join(datadir, dirname), fname)
+ data_files.append((pth, expath))
+ else:
+ data_files.append((os.path.join(datadir, dirname), [d]))
+
+# recursively grab the library and the examples subdirectories - all contents
+get_dir("library")
+if not os.environ.has_key("NOPORTEXAMPLES"):
+ get_dir("examples")
+
+from pprint import pprint
+pprint(data_files)
if __name__ == '__main__':
setup(name = "Pyjamas",
@@ -77,7 +85,6 @@
author = "The Pyjamas Project",
author_email = "lkcl@lkcl.net",
keywords = keyw,
- #scripts = ["bin/pyjscompile", "bin/pyjsbuild"],
entry_points = {'console_scripts':[
'pyjsbuild=pyjs.build:main',
'pyjscompile=pyjs:main',

File diff suppressed because it is too large Load Diff