Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.cmmi
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
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.recipe.cmmi
Commits
3b03f468
Commit
3b03f468
authored
Jun 13, 2024
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Plain Diff
Release 0.21: Adapt to python 3.12
See merge request
!18
parents
a957650d
48ce1af8
Pipeline
#35286
passed with stage
in 0 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
CHANGELOG.rst
CHANGELOG.rst
+5
-0
setup.py
setup.py
+1
-1
slapos/recipe/cmmi/__init__.py
slapos/recipe/cmmi/__init__.py
+15
-2
No files found.
CHANGELOG.rst
View file @
3b03f468
Changes
=======
0.21 (2024-06-13)
-----------------
- Adapt to python 3.12
0.20 (2024-03-19)
-----------------
...
...
setup.py
View file @
3b03f468
from
setuptools
import
setup
,
find_packages
import
os
version
=
'0.2
0
'
version
=
'0.2
1
'
name
=
'slapos.recipe.cmmi'
...
...
slapos/recipe/cmmi/__init__.py
View file @
3b03f468
import
errno
import
imp
import
logging
import
os
import
re
...
...
@@ -17,6 +16,20 @@ from ..utils import (
# from slapos.recipe.build
from
..
import
downloadunpacked
if
sys
.
version_info
>=
(
3
,
5
):
# See https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly
import
importlib.util
def
module_from_file_location
(
name
,
path
):
spec
=
importlib
.
util
.
spec_from_file_location
(
name
,
path
)
module
=
importlib
.
util
.
module_from_spec
(
spec
)
sys
.
modules
[
name
]
=
module
spec
.
loader
.
exec_module
(
module
)
return
module
else
:
# BBB Python2, Python < 3.5
from
imp
import
load_source
as
module_from_file_location
startup_environ
=
os
.
environ
.
copy
()
# backport of shlex.quote from Python 3.3
...
...
@@ -132,7 +145,7 @@ class Recipe(EnvironMixin):
try
:
if
not
is_temp
:
filename
=
os
.
path
.
abspath
(
filename
)
module
=
imp
.
load_source
(
'script
'
,
filename
)
module
=
module_from_file_location
(
'<script>
'
,
filename
)
script
=
getattr
(
module
,
callable
.
strip
())
try
:
script
(
self
.
options
,
self
.
buildout
,
self
.
environ
)
...
...
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