Skip to content

Commit e5bc87c

Browse files
author
yuliu
committed
Modified package for MCL
1 parent 5830e8a commit e5bc87c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+41
-30
lines changed

.gitignore

100644100755
File mode changed.

.travis.yml

100644100755
File mode changed.

NOTICE.txt

100644100755
File mode changed.

README.rst

100644100755
+1-1

bootstrap.py

100644100755
+36-15
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525

2626
from optparse import OptionParser
2727

28-
tmpeggs = tempfile.mkdtemp()
28+
__version__ = '2015-07-01'
29+
# See zc.buildout's changelog if this version is up to date.
30+
31+
tmpeggs = tempfile.mkdtemp(prefix='bootstrap-')
2932

3033
usage = '''\
3134
[DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]
@@ -40,8 +43,9 @@
4043
'''
4144

4245
parser = OptionParser(usage=usage)
43-
parser.add_option("-v", "--version", help="use a specific zc.buildout version")
44-
46+
parser.add_option("--version",
47+
action="store_true", default=False,
48+
help=("Return bootstrap.py version."))
4549
parser.add_option("-t", "--accept-buildout-test-releases",
4650
dest='accept_buildout_test_releases',
4751
action="store_true", default=False,
@@ -59,25 +63,33 @@
5963
parser.add_option("--allow-site-packages",
6064
action="store_true", default=False,
6165
help=("Let bootstrap.py use existing site packages"))
66+
parser.add_option("--buildout-version",
67+
help="Use a specific zc.buildout version")
6268
parser.add_option("--setuptools-version",
63-
help="use a specific setuptools version")
64-
69+
help="Use a specific setuptools version")
70+
parser.add_option("--setuptools-to-dir",
71+
help=("Allow for re-use of existing directory of "
72+
"setuptools versions"))
6573

6674
options, args = parser.parse_args()
75+
if options.version:
76+
print("bootstrap.py version %s" % __version__)
77+
sys.exit(0)
78+
6779

6880
######################################################################
6981
# load/install setuptools
7082

7183
try:
72-
if options.allow_site_packages:
73-
import setuptools
74-
import pkg_resources
7584
from urllib.request import urlopen
7685
except ImportError:
7786
from urllib2 import urlopen
7887

7988
ez = {}
80-
exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez)
89+
if os.path.exists('ez_setup.py'):
90+
exec(open('ez_setup.py').read(), ez)
91+
else:
92+
exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez)
8193

8294
if not options.allow_site_packages:
8395
# ez_setup imports site, which adds site packages
@@ -88,12 +100,19 @@
88100
# We can't remove these reliably
89101
if hasattr(site, 'getsitepackages'):
90102
for sitepackage_path in site.getsitepackages():
91-
sys.path[:] = [x for x in sys.path if sitepackage_path not in x]
103+
# Strip all site-packages directories from sys.path that
104+
# are not sys.prefix; this is because on Windows
105+
# sys.prefix is a site-package directory.
106+
if sitepackage_path != sys.prefix:
107+
sys.path[:] = [x for x in sys.path
108+
if sitepackage_path not in x]
92109

93110
setup_args = dict(to_dir=tmpeggs, download_delay=0)
94111

95112
if options.setuptools_version is not None:
96113
setup_args['version'] = options.setuptools_version
114+
if options.setuptools_to_dir is not None:
115+
setup_args['to_dir'] = options.setuptools_to_dir
97116

98117
ez['use_setuptools'](**setup_args)
99118
import setuptools
@@ -110,7 +129,12 @@
110129

111130
ws = pkg_resources.working_set
112131

132+
setuptools_path = ws.find(
133+
pkg_resources.Requirement.parse('setuptools')).location
134+
135+
# Fix sys.path here as easy_install.pth added before PYTHONPATH
113136
cmd = [sys.executable, '-c',
137+
'import sys; sys.path[0:0] = [%r]; ' % setuptools_path +
114138
'from setuptools.command.easy_install import main; main()',
115139
'-mZqNxd', tmpeggs]
116140

@@ -123,11 +147,8 @@
123147
if find_links:
124148
cmd.extend(['-f', find_links])
125149

126-
setuptools_path = ws.find(
127-
pkg_resources.Requirement.parse('setuptools')).location
128-
129150
requirement = 'zc.buildout'
130-
version = options.version
151+
version = options.buildout_version
131152
if version is None and not options.accept_buildout_test_releases:
132153
# Figure out the most recent final version of zc.buildout.
133154
import setuptools.package_index
@@ -167,7 +188,7 @@ def _final_version(parsed_version):
167188
cmd.append(requirement)
168189

169190
import subprocess
170-
if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=setuptools_path)) != 0:
191+
if subprocess.call(cmd) != 0:
171192
raise Exception(
172193
"Failed to execute command:\n%s" % repr(cmd)[1:-1])
173194

buildout.cfg

100644100755
File mode changed.

docs/HISTORY.txt

100644100755
File mode changed.

docs/INSTALL.txt

100644100755
File mode changed.

docs/LICENSE.txt

100644100755
File mode changed.

eke.study.sublime-project

-10
This file was deleted.

eke/__init__.py

100644100755
File mode changed.

eke/study/README.rst

100644100755
File mode changed.

eke/study/__init__.py

100644100755
File mode changed.

eke/study/browser/__init__.py

100644100755
File mode changed.

eke/study/browser/configure.zcml

100644100755
File mode changed.

eke/study/browser/images/nonEDRNProtocol.png

100644100755
File mode changed.

eke/study/browser/images/protocol.gif

100644100755
File mode changed.

eke/study/browser/images/study-folder.gif

100644100755
File mode changed.

eke/study/browser/images/teamProject.png

100644100755
File mode changed.

eke/study/browser/rdf.py

100644100755
File mode changed.

eke/study/browser/stylesheets/protocol.css

100644100755
File mode changed.

eke/study/browser/templates/protocol.pt

100644100755
File mode changed.

eke/study/browser/templates/studyfolder.pt

100644100755
File mode changed.

eke/study/browser/views.py

100644100755
File mode changed.

eke/study/config.py

100644100755
File mode changed.

eke/study/configure.zcml

100644100755
File mode changed.

eke/study/content/__init__.py

100644100755
File mode changed.

eke/study/content/configure.zcml

100644100755
File mode changed.

eke/study/content/protocol.py

100644100755
File mode changed.

eke/study/content/studyfolder.py

100644100755
File mode changed.

eke/study/interfaces.py

100644100755
File mode changed.

eke/study/overrides.zcml

100644100755
File mode changed.

eke/study/profiles/default/catalog.xml

100644100755
File mode changed.

eke/study/profiles/default/factorytool.xml

100644100755
File mode changed.

eke/study/profiles/default/metadata.xml

100644100755
File mode changed.

eke/study/profiles/default/rolemap.xml

100644100755
File mode changed.

eke/study/profiles/default/types.xml

100644100755
File mode changed.

eke/study/profiles/default/types/Protocol.xml

100644100755
File mode changed.

eke/study/profiles/default/types/Study_Folder.xml

100644100755
File mode changed.

eke/study/testing.py

100644100755
File mode changed.

eke/study/tests/__init__.py

100644100755
File mode changed.

eke/study/tests/base.py

100644100755
File mode changed.

eke/study/tests/testDoctest.py

100644100755
File mode changed.

eke/study/tests/testSetup.py

100644100755
File mode changed.

eke/study/upgrades.py

100644100755
File mode changed.

eke/study/upgrades.zcml

100644100755
File mode changed.

eke/study/utils.py

100644100755
File mode changed.

setup.cfg

100644100755
File mode changed.

setup.py

100644100755
+4-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
# Package data
1010
# ------------
1111

12-
_name = 'eke.study'
13-
_version = '1.1.14'
14-
_description = 'Study and protocol information for the EDRN Knowledge Environment'
12+
_name = 'jpl.mcl.protocol'
13+
_version = '0.0.1'
14+
_description = 'Study and protocol information for the MCL'
1515
_author = 'Sean Kelly'
1616
_authorEmail = '[email protected]'
1717
_license = 'ALv2'
1818
_namespaces = ['eke']
1919
_zipSafe = False
20-
_keywords = 'web zope plone edrn cancer biomarkers eke study protocol'
20+
_keywords = 'web zope plone edrn cancer biomarkers jpl.mcl.protocol protocol'
2121
_entryPoints = {
2222
'z3c.autoinclude.plugin': ['target=plone'],
2323
}

travis.cfg

100644100755
File mode changed.

0 commit comments

Comments
 (0)