Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
4dfb8940
Unverified
Commit
4dfb8940
authored
Mar 18, 2023
by
Randy Döring
Committed by
GitHub
Mar 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
installer: fix optimization level (#7666)
parent
cbfdc628
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletions
+3
-1
src/poetry/installation/wheel_installer.py
+1
-1
tests/installation/test_wheel_installer.py
+2
-0
No files found.
src/poetry/installation/wheel_installer.py
View file @
4dfb8940
...
...
@@ -94,7 +94,7 @@ class WheelInstaller:
)
def
enable_bytecode_compilation
(
self
,
enable
:
bool
=
True
)
->
None
:
self
.
_destination
.
bytecode_optimization_levels
=
(
1
,)
if
enable
else
()
self
.
_destination
.
bytecode_optimization_levels
=
(
-
1
,)
if
enable
else
()
def
install
(
self
,
wheel
:
Path
)
->
None
:
with
WheelFile
.
open
(
wheel
)
as
source
:
...
...
tests/installation/test_wheel_installer.py
View file @
4dfb8940
...
...
@@ -77,5 +77,7 @@ def test_enable_bytecode_compilation(
if
compile
:
assert
cache_dir
.
exists
()
assert
list
(
cache_dir
.
glob
(
"*.pyc"
))
assert
not
list
(
cache_dir
.
glob
(
"*.opt-1.pyc"
))
assert
not
list
(
cache_dir
.
glob
(
"*.opt-2.pyc"
))
else
:
assert
not
cache_dir
.
exists
()
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