Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos.buildout
Commits
488b2dfd
Commit
488b2dfd
authored
Apr 22, 2020
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore directory containing the Python library
This is useful when using OS Python & eggs. Useless for SlapOS.
parent
b668a6cd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
19 deletions
+20
-19
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+2
-1
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+16
-16
src/zc/buildout/easy_install.txt
src/zc/buildout/easy_install.txt
+2
-2
No files found.
src/zc/buildout/buildout.py
View file @
488b2dfd
...
@@ -1952,7 +1952,8 @@ def _dists_sig(dists):
...
@@ -1952,7 +1952,8 @@ def _dists_sig(dists):
continue
continue
seen
.
add
(
dist
)
seen
.
add
(
dist
)
location
=
dist
.
location
location
=
dist
.
location
if
dist
.
precedence
==
pkg_resources
.
DEVELOP_DIST
:
if
(
dist
.
precedence
==
pkg_resources
.
DEVELOP_DIST
and
location
!=
zc
.
buildout
.
easy_install
.
python_lib
):
result
.
append
(
dist
.
project_name
+
'-'
+
_dir_hash
(
location
))
result
.
append
(
dist
.
project_name
+
'-'
+
_dir_hash
(
location
))
else
:
else
:
result
.
append
(
dist
.
project_name
+
'-'
+
dist
.
version
)
result
.
append
(
dist
.
project_name
+
'-'
+
dist
.
version
)
...
...
src/zc/buildout/easy_install.py
View file @
488b2dfd
...
@@ -19,6 +19,7 @@ installed.
...
@@ -19,6 +19,7 @@ installed.
"""
"""
import
distutils.errors
import
distutils.errors
import
distutils.sysconfig
import
errno
import
errno
import
glob
import
glob
import
logging
import
logging
...
@@ -105,6 +106,8 @@ buildout_and_setuptools_path = [
...
@@ -105,6 +106,8 @@ buildout_and_setuptools_path = [
setuptools_pythonpath
,
setuptools_pythonpath
,
]
]
python_lib
=
distutils
.
sysconfig
.
get_python_lib
()
FILE_SCHEME
=
re
.
compile
(
'file://'
,
re
.
I
).
match
FILE_SCHEME
=
re
.
compile
(
'file://'
,
re
.
I
).
match
DUNDER_FILE_PATTERN
=
re
.
compile
(
r"__file__ = '(?P<filename>.+)'$"
)
DUNDER_FILE_PATTERN
=
re
.
compile
(
r"__file__ = '(?P<filename>.+)'$"
)
...
@@ -1258,6 +1261,10 @@ def scripts(reqs, working_set, executable, dest=None,
...
@@ -1258,6 +1261,10 @@ def scripts(reqs, working_set, executable, dest=None,
if
p
not
in
unique_path
:
if
p
not
in
unique_path
:
unique_path
.
append
(
p
)
unique_path
.
append
(
p
)
path
=
list
(
map
(
realpath
,
unique_path
))
path
=
list
(
map
(
realpath
,
unique_path
))
try
:
path
.
remove
(
python_lib
)
except
ValueError
:
pass
generated
=
[]
generated
=
[]
...
@@ -1408,6 +1415,12 @@ join = os.path.join
...
@@ -1408,6 +1415,12 @@ join = os.path.join
base = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
base = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
"""
"""
def
_initialization
(
path
,
initialization
):
return
"""sys.path[0:0] = [
%s,
]
"""
%
path
+
initialization
if
path
else
initialization
def
_script
(
module_name
,
attrs
,
path
,
dest
,
arguments
,
initialization
,
rsetup
):
def
_script
(
module_name
,
attrs
,
path
,
dest
,
arguments
,
initialization
,
rsetup
):
if
is_win32
:
if
is_win32
:
dest
+=
'-script.py'
dest
+=
'-script.py'
...
@@ -1416,11 +1429,10 @@ def _script(module_name, attrs, path, dest, arguments, initialization, rsetup):
...
@@ -1416,11 +1429,10 @@ def _script(module_name, attrs, path, dest, arguments, initialization, rsetup):
contents
=
script_template
%
dict
(
contents
=
script_template
%
dict
(
python
=
python
,
python
=
python
,
path
=
path
,
module_name
=
module_name
,
module_name
=
module_name
,
attrs
=
attrs
,
attrs
=
attrs
,
arguments
=
arguments
,
arguments
=
arguments
,
initialization
=
initialization
,
initialization
=
_initialization
(
path
,
initialization
)
,
relative_paths_setup
=
rsetup
,
relative_paths_setup
=
rsetup
,
)
)
return
_create_script
(
contents
,
dest
)
return
_create_script
(
contents
,
dest
)
...
@@ -1453,8 +1465,7 @@ def _distutils_script(path, dest, script_content, initialization, rsetup):
...
@@ -1453,8 +1465,7 @@ def _distutils_script(path, dest, script_content, initialization, rsetup):
contents
=
distutils_script_template
%
dict
(
contents
=
distutils_script_template
%
dict
(
python
=
python
,
python
=
python
,
path
=
path
,
initialization
=
_initialization
(
path
,
initialization
),
initialization
=
initialization
,
relative_paths_setup
=
rsetup
,
relative_paths_setup
=
rsetup
,
before
=
before
,
before
=
before
,
after
=
after
after
=
after
...
@@ -1522,9 +1533,6 @@ script_template = script_header + '''\
...
@@ -1522,9 +1533,6 @@ script_template = script_header + '''\
%(relative_paths_setup)s
%(relative_paths_setup)s
import sys
import sys
sys.path[0:0] = [
%(path)s,
]
%(initialization)s
%(initialization)s
import %(module_name)s
import %(module_name)s
...
@@ -1536,9 +1544,6 @@ distutils_script_template = script_header + '''
...
@@ -1536,9 +1544,6 @@ distutils_script_template = script_header + '''
%(before)s
%(before)s
%(relative_paths_setup)s
%(relative_paths_setup)s
import sys
import sys
sys.path[0:0] = [
%(path)s,
]
%(initialization)s
%(initialization)s
%(after)s'''
%(after)s'''
...
@@ -1551,14 +1556,12 @@ def _pyscript(path, dest, rsetup, initialization=''):
...
@@ -1551,14 +1556,12 @@ def _pyscript(path, dest, rsetup, initialization=''):
dest
+=
'-script.py'
dest
+=
'-script.py'
python
=
_safe_arg
(
sys
.
executable
)
python
=
_safe_arg
(
sys
.
executable
)
if
path
:
path
+=
','
# Courtesy comma at the end of the list.
contents
=
py_script_template
%
dict
(
contents
=
py_script_template
%
dict
(
python
=
python
,
python
=
python
,
path
=
path
,
path
=
path
,
relative_paths_setup
=
rsetup
,
relative_paths_setup
=
rsetup
,
initialization
=
initialization
,
initialization
=
_initialization
(
path
,
initialization
)
,
)
)
changed
=
_file_changed
(
dest
,
contents
)
changed
=
_file_changed
(
dest
,
contents
)
...
@@ -1588,9 +1591,6 @@ py_script_template = script_header + '''\
...
@@ -1588,9 +1591,6 @@ py_script_template = script_header + '''\
%(relative_paths_setup)s
%(relative_paths_setup)s
import sys
import sys
sys.path[0:0] = [
%(path)s
]
%(initialization)s
%(initialization)s
_interactive = True
_interactive = True
...
...
src/zc/buildout/easy_install.txt
View file @
488b2dfd
...
@@ -687,9 +687,9 @@ An interpreter can also be generated without other eggs:
...
@@ -687,9 +687,9 @@ An interpreter can also be generated without other eggs:
<BLANKLINE>
<BLANKLINE>
import sys
import sys
<BLANKLINE>
<BLANKLINE>
sys.path[0:0] = [
<BLANKLINE>
<BLANKLINE>
]
<BLANKLINE>
_interactive = True
...
...
An additional argument can be passed to define which scripts to install
An additional argument can be passed to define which scripts to install
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment