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
Xavier Thompson
slapos.buildout
Commits
43321e47
Commit
43321e47
authored
Dec 06, 2024
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test] Add test for PEP 625 workaround
parent
498215d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
1 deletion
+51
-1
src/zc/buildout/tests/__init__.py
src/zc/buildout/tests/__init__.py
+17
-1
src/zc/buildout/tests/downloadcache.txt
src/zc/buildout/tests/downloadcache.txt
+1
-0
src/zc/buildout/tests/easy_install.txt
src/zc/buildout/tests/easy_install.txt
+32
-0
zc.recipe.egg_/src/zc/recipe/egg/README.rst
zc.recipe.egg_/src/zc/recipe/egg/README.rst
+1
-0
No files found.
src/zc/buildout/tests/__init__.py
View file @
43321e47
...
...
@@ -113,6 +113,23 @@ def create_sample_eggs(test, executable=sys.executable):
os
.
rename
(
file
,
file
.
lower
())
os
.
chdir
(
curdir
)
# PEP 625 sdist for PEP 625 workaround test
write
(
tmp
,
'pep625_wkrd.py'
,
'def f():
\
n
pass'
)
write
(
tmp
,
'setup.py'
,
"from setuptools import setup
\
n
"
"setup(name='pep625.wkrd', py_modules=['pep625_wkrd'],"
" author='bob', url='bob', author_email='bob',"
" zip_safe=True, version='1.0')
\
n
"
)
zc
.
buildout
.
testing
.
sdist
(
tmp
,
dest
)
curdir
=
os
.
getcwd
()
os
.
chdir
(
dest
)
for
file
in
os
.
listdir
(
dest
):
if
'pep625.wkrd'
in
file
:
os
.
rename
(
file
,
file
.
replace
(
'pep625.wkrd'
,
'pep625_wkrd'
))
os
.
chdir
(
curdir
)
write
(
tmp
,
'eggrecipebigdemo.py'
,
'import eggrecipedemo'
)
write
(
tmp
,
'setup.py'
,
...
...
@@ -162,7 +179,6 @@ def create_sample_eggs(test, executable=sys.executable):
"import builddep"
)
zc
.
buildout
.
testing
.
sdist
(
tmp
,
dest
)
finally
:
shutil
.
rmtree
(
tmp
)
...
...
src/zc/buildout/tests/downloadcache.txt
View file @
43321e47
...
...
@@ -47,6 +47,7 @@ download:
<a href="index/">index/</a><br>
<a href="mixedcase-0.5.zip">mixedcase-0.5.zip</a><br>
<a href="other-1.0-pyN.N.egg">other-1.0-pyN.N.egg</a><br>
<a href="pep625_wkrd-1.0.zip">pep625_wkrd-1.0.zip</a><br>
<a href="withbuildsystemrequires-0.1.zip">withbuildsystemrequires-0.1.zip</a><br>
<a href="withsetuprequires-0.1.zip">withsetuprequires-0.1.zip</a><br>
</body></html>
...
...
src/zc/buildout/tests/easy_install.txt
View file @
43321e47
...
...
@@ -111,6 +111,7 @@ We have a link server that has a number of eggs:
<a href="index/">index/</a><br>
<a href="mixedcase-0.5.zip">mixedcase-0.5.zip</a><br>
<a href="other-1.0-pyN.N.egg">other-1.0-pyN.N.egg</a><br>
<a href="pep625_wkrd-1.0.zip">pep625_wkrd-1.0.zip</a><br>
<a href="withbuildsystemrequires-0.1.zip">withbuildsystemrequires-0.1.zip</a><br>
<a href="withsetuprequires-0.1.zip">withsetuprequires-0.1.zip</a><br>
</body></html>
...
...
@@ -275,6 +276,36 @@ And cleanup.
>>> _ = get(link_server + 'disable_server_logging')
>>> rmdir(dest)
PEP 625 issues
--------------
Let's install an egg with PEP 625 naming issues.
Specifically, the sdist file is normalized to replace '.' with '_'
in the project name, while the name of the package contains '.'.
Let's enable server logging to check that the PEP 625 file is downloaded.
>>> _ = get(link_server + 'enable_server_logging')
GET 200 /enable_server_logging
>>> ws = zc.buildout.easy_install.install(
... ['pep625.wkrd'], dest,
... links=[link_server], index=link_server+'index/')
GET 404 /index/pep625.wkrd/
GET 200 /pep625_wkrd-1.0.zip
Let's check that the original project name dist is installed.
>>> for dist in ws:
... print_(dist)
pep625.wkrd 1.0
>>> ls(dest)
d pep625.wkrd-1.0-pyN.N.egg
And cleanup.
>>> _ = get(link_server + 'disable_server_logging')
>>> rmdir(dest)
Specifying version information independent of requirements
----------------------------------------------------------
...
...
@@ -1251,6 +1282,7 @@ Let's update our link server with a new version of extdemo:
<a href="index/">index/</a><br>
<a href="mixedcase-0.5.zip">mixedcase-0.5.zip</a><br>
<a href="other-1.0-pyN.N.egg">other-1.0-pyN.N.egg</a><br>
<a href="pep625_wkrd-1.0.zip">pep625_wkrd-1.0.zip</a><br>
<a href="withbuildsystemrequires-0.1.zip">withbuildsystemrequires-0.1.zip</a><br>
<a href="withsetuprequires-0.1.zip">withsetuprequires-0.1.zip</a><br>
</body></html>
...
...
zc.recipe.egg_/src/zc/recipe/egg/README.rst
View file @
43321e47
...
...
@@ -54,6 +54,7 @@ We have a link server that has a number of distributions:
<a
href=
"index/"
>
index/
</a><br>
<a
href=
"mixedcase-0.5.zip"
>
mixedcase-0.5.zip
</a><br>
<a
href=
"other-1.0-pyN.N.egg"
>
other-1.0-pyN.N.egg
</a><br>
<a
href=
"pep625_wkrd-1.0.zip"
>
pep625_wkrd-1.0.zip
</a><br>
<a
href=
"withbuildsystemrequires-0.1.zip"
>
withbuildsystemrequires-0.1.zip
</a><br>
<a
href=
"withsetuprequires-0.1.zip"
>
withsetuprequires-0.1.zip
</a><br>
</body></html>
...
...
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