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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.buildout
Commits
2a91e9f4
Commit
2a91e9f4
authored
Feb 25, 2022
by
Godefroid Chapelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix github actions
parent
346333a9
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
53 additions
and
35 deletions
+53
-35
.github/workflows/Dockerfile
.github/workflows/Dockerfile
+2
-1
.github/workflows/Dockerfile-debian
.github/workflows/Dockerfile-debian
+1
-0
.github/workflows/Dockerfile-debian-system
.github/workflows/Dockerfile-debian-system
+2
-1
.github/workflows/Makefile-scripts
.github/workflows/Makefile-scripts
+0
-0
.github/workflows/Makefile-scripts-setuptools-head
.github/workflows/Makefile-scripts-setuptools-head
+8
-0
.github/workflows/python-runners.yml
.github/workflows/python-runners.yml
+2
-4
.github/workflows/scripts-setuptools-head.yml
.github/workflows/scripts-setuptools-head.yml
+2
-8
.github/workflows/scripts.yml
.github/workflows/scripts.yml
+3
-2
Makefile
Makefile
+2
-1
Makefile.builds
Makefile.builds
+7
-0
builds/bare_machines/ci_build.sh
builds/bare_machines/ci_build.sh
+1
-1
builds/centos_containers/ci_build.sh
builds/centos_containers/ci_build.sh
+1
-1
builds/debian_containers/ci_build.sh
builds/debian_containers/ci_build.sh
+1
-1
builds/debian_sys_container/ci_build.sh
builds/debian_sys_container/ci_build.sh
+1
-1
dev.py
dev.py
+2
-0
src/zc/buildout/patches.py
src/zc/buildout/patches.py
+2
-0
src/zc/buildout/tests/easy_install.txt
src/zc/buildout/tests/easy_install.txt
+16
-13
src/zc/buildout/tests/test_all.py
src/zc/buildout/tests/test_all.py
+0
-1
No files found.
.github/workflows/Dockerfile
View file @
2a91e9f4
FROM
centos
as centos-python
FROM
quay.io/centos/centos:stream8
as centos-python
RUN
yum
install
-y
make gcc openssl-devel libffi-devel sqlite-devel glibc-langpack-en
RUN
useradd
-ms
/bin/bash buildout
USER
buildout
...
...
@@ -19,3 +19,4 @@ USER root
RUN
chown
-R
buildout:buildout
*
USER
buildout
RUN
make
PYTHON_VER
=
${
PYTHON_VER
}
build
COPY
Makefile.builds /home/buildout/sandbox/
.github/workflows/Dockerfile-debian
View file @
2a91e9f4
...
...
@@ -20,3 +20,4 @@ USER root
RUN chown -R buildout:buildout *
USER buildout
RUN make PYTHON_VER=${PYTHON_VER} build
COPY Makefile.builds /home/buildout/sandbox/
.github/workflows/Dockerfile-debian-system
View file @
2a91e9f4
FROM debian:stable-slim as debian-python
RUN apt-get update
RUN apt-get install -y gcc python3-dev python3-certifi python3-setuptools python3-coverage python3-wheel
RUN apt-get install -y gcc python3-dev python3-certifi python3-setuptools python3-coverage python3-wheel
make
RUN useradd -ms /bin/bash buildout
USER buildout
RUN mkdir /home/buildout/sandbox
...
...
@@ -15,3 +15,4 @@ USER root
RUN chown -R buildout:buildout *
USER buildout
RUN python3 dev.py
COPY Makefile Makefile.* /home/buildout/sandbox/
.github/workflows/Makefile
→
.github/workflows/Makefile
-scripts
View file @
2a91e9f4
File moved
.github/workflows/Makefile-scripts-setuptools-head
0 → 100644
View file @
2a91e9f4
sandbox/bin/python:
pip install virtualenv
virtualenv --no-setuptools sandbox
sandbox/bin/pip install -e "git+https://github.com/pypa/setuptools.git#egg=setuptools"
sandbox/bin/buildout: sandbox/bin/python
sandbox/bin/python setup.py develop
.github/workflows/python-runners.yml
View file @
2a91e9f4
...
...
@@ -27,14 +27,12 @@ jobs:
with
:
path
:
eggs
key
:
${{ matrix.os }}-{{ matrix.python-version }}-eggs
-
name
:
Install dev environment
run
:
|
python dev.py
-
name
:
Run tests
env
:
TMPDIR
:
${{ env.HOME }}/AppData/Local/Temp
TMP
:
${{ env.HOME }}/AppData/Local/Temp
TEMP
:
${{ env.HOME }}/AppData/Local/Temp
BUILD_TYPE
:
bare_machines
run
:
|
echo $TMPDIR
bin/test -c -vvv
./ci_build.sh
.github/workflows/scripts-setuptools-head.yml
View file @
2a91e9f4
...
...
@@ -22,18 +22,12 @@ jobs:
python-version
:
${{ matrix.python-version }}
-
name
:
Setup buildout virtualenv
run
:
|
make -f .github/workflows/Makefile sandbox/bin/buildout
-
name
:
Use setuptools develop
env
:
PYTHON_VERSION
:
${{matrix.python-version}}
run
:
|
./sandbox/bin/pip uninstall -y setuptools
./sandbox/bin/pip install -e "git+https://github.com/pypa/setuptools.git#egg=setuptools"
ls ../sandbox/lib/python${PYTHON_VERSION}/site-packages
make -f .github/workflows/Makefile-scripts-setuptools-head sandbox/bin/buildout
-
name
:
Run buildout
env
:
PACKAGE
:
${{matrix.package}}
PYTHON_VERSION
:
${{matrix.python-version}}
SETUPTOOLS_USE_DISTUTILS
:
stdlib
run
:
|
sandbox/bin/buildout -v -c .github/workflows/scripts-${PYTHON_VERSION}.cfg annotate buildout
sandbox/bin/buildout -c .github/workflows/scripts-${PYTHON_VERSION}.cfg
...
...
.github/workflows/scripts.yml
View file @
2a91e9f4
...
...
@@ -9,7 +9,7 @@ jobs:
strategy
:
max-parallel
:
4
matrix
:
python-version
:
[
"
2.7"
,
"
3.
5"
,
"
3.
6"
,
"
3.7"
,
"
3.8"
,
"
3.9"
,
"
3.10"
]
python-version
:
[
"
2.7"
,
"
3.6"
,
"
3.7"
,
"
3.8"
,
"
3.9"
,
"
3.10"
]
package
:
[
zest.releaser
,
pyspf
]
steps
:
...
...
@@ -20,11 +20,12 @@ jobs:
python-version
:
${{ matrix.python-version }}
-
name
:
Setup buildout virtualenv
run
:
|
make -f .github/workflows/Makefile sandbox/bin/buildout
make -f .github/workflows/Makefile
-scripts
sandbox/bin/buildout
-
name
:
Run buildout
env
:
PACKAGE
:
${{matrix.package}}
PYTHON_VERSION
:
${{matrix.python-version}}
SETUPTOOLS_USE_DISTUTILS
:
stdlib
run
:
|
sandbox/bin/buildout -v -c .github/workflows/scripts-${PYTHON_VERSION}.cfg annotate buildout
sandbox/bin/buildout -c .github/workflows/scripts-${PYTHON_VERSION}.cfg
...
...
Makefile
View file @
2a91e9f4
...
...
@@ -5,6 +5,7 @@ PYTHON_BUILD_DIR = $(HERE)/python_builds
PLATFORM
=
$(
shell
uname
)
VENV
=
$(HERE)
/venvs/
$(PYTHON_VER)
BUILD_VARIABLES
=
PYTHONWARNINGS
=
"ignore:Setuptools is replacing distutils,ignore:setup.py install is deprecated,ignore:easy_install command is deprecated"
ifeq
($(PYTHON_VER),2.7)
PYTHON_MINOR
?=
2.7.18
...
...
@@ -109,7 +110,7 @@ coverage: $(VENV)/bin/coverage $(VENV)/bin/test
COVERAGE_REPORT
=
RUN_COVERAGE
=
$(VENV)
/bin/test
$(testargs)
test
:
$(VENV)/bin/test
$(VENV)
/bin/test
-c
-vvv
$(testargs)
PYTHONWARNINGS
=
$(PYTHONWARNINGS)
$(VENV)
/bin/test
-c
-vvv
$(testargs)
all_pythons
:
$(MAKE)
PYTHON_VER
=
2.7 python
...
...
Makefile.builds
0 → 100644
View file @
2a91e9f4
include
Makefile
test_with_coverage
:
PYTHONWARNINGS
=
$(PYTHONWARNINGS)
bin/test
-c
-vvv
test_without_coverage
:
PYTHONWARNINGS
=
$(PYTHONWARNINGS)
RUN_COVERAGE
=
COVERAGE_REPORT
=
/home/buildout/sandbox/bin/test
-c
-vvv
builds/bare_machines/ci_build.sh
View file @
2a91e9f4
...
...
@@ -9,4 +9,4 @@ cd ../..
# which breaks test suite
pip
${
PYTHON_VER
}
uninstall
-y
six
||
true
python
${
PYTHON_VER
}
dev.py
bin/test
-c
-vvv
make
-f
Makefile.builds test_with_coverage
builds/centos_containers/ci_build.sh
View file @
2a91e9f4
...
...
@@ -5,4 +5,4 @@ set -e
cd
../..
docker build
-f
.github/workflows/Dockerfile
--tag
centos_buildout:python
${
PYTHON_VER
}
--build-arg
PYTHON_VER
=
${
PYTHON_VER
}
.
docker run
centos_buildout:python
${
PYTHON_VER
}
/bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /home/buildout/sandbox/bin/test -c -vvv'
docker run
"centos_buildout:python
${
PYTHON_VER
}
"
make
-f
Makefile.builds test_without_coverage
builds/debian_containers/ci_build.sh
View file @
2a91e9f4
...
...
@@ -5,4 +5,4 @@ set -e
cd
../..
docker build
-f
.github/workflows/Dockerfile-debian
--tag
debian_buildout:python
${
PYTHON_VER
}
--build-arg
PYTHON_VER
=
${
PYTHON_VER
}
.
docker run
debian_buildout:python
${
PYTHON_VER
}
/bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /home/buildout/sandbox/bin/test -c -vvv'
docker run
"debian_buildout:python
${
PYTHON_VER
}
"
make
-f
Makefile.builds test_without_coverage
builds/debian_sys_container/ci_build.sh
View file @
2a91e9f4
...
...
@@ -5,4 +5,4 @@ set -e
cd
../..
docker build
-f
.github/workflows/Dockerfile-debian-system
--tag
debian_system_buildout
.
docker run debian_system_buildout
/bin/bash
-c
'RUN_COVERAGE= COVERAGE_REPORT= /home/buildout/sandbox/bin/test -c -vvv'
docker run debian_system_buildout
make
-f
Makefile.builds test_without_coverage
dev.py
View file @
2a91e9f4
...
...
@@ -27,6 +27,8 @@ if sys.version_info > (3, ) and sys.version_info < (3, 5):
import
os
,
shutil
,
subprocess
,
tempfile
os
.
environ
[
"SETUPTOOLS_USE_DISTUTILS"
]
=
"stdlib"
for
d
in
'eggs'
,
'develop-eggs'
,
'bin'
,
'parts'
:
if
not
os
.
path
.
exists
(
d
):
os
.
mkdir
(
d
)
...
...
src/zc/buildout/patches.py
View file @
2a91e9f4
...
...
@@ -41,6 +41,8 @@ patch_Distribution()
def
patch_PackageIndex
():
try
:
import
logging
logging
.
getLogger
(
'pip._internal.index.collector'
).
setLevel
(
logging
.
ERROR
)
from
setuptools.package_index
import
PackageIndex
from
setuptools.package_index
import
URL_SCHEME
from
setuptools.package_index
import
HREF
...
...
src/zc/buildout/tests/easy_install.txt
View file @
2a91e9f4
...
...
@@ -1213,7 +1213,7 @@ distribution:
>>> zc.buildout.easy_install.build(
... 'extdemo', dest,
... {'include
-
dirs': os.path.join(sample_buildout, 'include')},
... {'include
_
dirs': os.path.join(sample_buildout, 'include')},
... links=[link_server], index=link_server+'index/')
['/sample-install/extdemo-1.4-py2.4-unix-i686.egg']
...
...
@@ -1259,7 +1259,7 @@ If we run build with newest set to False, we won't get an update:
>>> zc.buildout.easy_install.build(
... 'extdemo', dest,
... {'include
-
dirs': os.path.join(sample_buildout, 'include')},
... {'include
_
dirs': os.path.join(sample_buildout, 'include')},
... links=[link_server], index=link_server+'index/',
... newest=False)
['/sample-install/extdemo-1.4-py2.4-linux-i686.egg']
...
...
@@ -1276,7 +1276,7 @@ get an updated egg:
>>> zc.buildout.easy_install.build(
... 'extdemo', dest,
... {'include
-
dirs': os.path.join(sample_buildout, 'include')},
... {'include
_
dirs': os.path.join(sample_buildout, 'include')},
... links=[link_server], index=link_server+'index/')
['/sample-install/extdemo-1.5-py2.4-unix-i686.egg']
...
...
@@ -1299,7 +1299,7 @@ first:
>>> zc.buildout.easy_install.build(
... 'extdemo', dest,
... {'include
-
dirs': os.path.join(sample_buildout, 'include')},
... {'include
_
dirs': os.path.join(sample_buildout, 'include')},
... links=[link_server], index=link_server+'index/',
... versions=dict(extdemo='1.4'))
['/sample-install/extdemo-1.4-py2.4-unix-i686.egg']
...
...
@@ -1331,19 +1331,22 @@ build_ext
We have a local directory containing the extdemo source:
>>> ls(extdemo)
- MANIFEST
- MANIFEST.in
- README
- extdemo.c
- setup.py
>>> contents = os.listdir(extdemo)
>>> 'MANIFEST.in' in contents
True
>>> 'README' in contents
True
>>> 'extdemo.c' in contents
True
>>> 'setup.py' in contents
True
Now, we can use the develop function to create a develop egg from the source
distribution:
>>> zc.buildout.easy_install.develop(
... extdemo, dest,
... {'include
-
dirs': os.path.join(sample_buildout, 'include')})
... {'include
_
dirs': os.path.join(sample_buildout, 'include')})
'/sample-install/extdemo.egg-link'
The name of the egg link created is returned.
...
...
@@ -1407,7 +1410,7 @@ Now, if we install demo, and extdemo:
>>> zc.buildout.easy_install.build(
... 'extdemo', dest,
... {'include
-
dirs': os.path.join(sample_buildout, 'include')},
... {'include
_
dirs': os.path.join(sample_buildout, 'include')},
... links=[link_server], index=link_server+'index/')
GET 404 /index/extdemo/
GET 200 /extdemo-1.5.zip
...
...
@@ -1448,7 +1451,7 @@ Now when we install the distributions:
>>> zc.buildout.easy_install.build(
... 'extdemo', dest,
... {'include
-
dirs': os.path.join(sample_buildout, 'include')},
... {'include
_
dirs': os.path.join(sample_buildout, 'include')},
... links=[link_server], index=link_server+'index/')
GET 404 /index/extdemo/
['/sample-install/extdemo-1.5-py2.4-linux-i686.egg']
...
...
src/zc/buildout/tests/test_all.py
View file @
2a91e9f4
...
...
@@ -2282,7 +2282,6 @@ We'll create a wacky buildout extension that just announces itself when used:
Now we'll create a buildout that uses this extension to load other packages:
>>> wacky_server = link_server.replace('http', 'wacky')
>>> dist = 'file://' + join(src, 'dist').replace(os.path.sep, '/')
>>> write('buildout.cfg',
... '''
...
...
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