-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from acsone/compat-editable
Enforce compat editable mode
- Loading branch information
Showing
4 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Ensure the setuptools ``compat`` editable mode is used when installing in PEP 660 mode. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# -*- coding: utf-8 -*- | ||
try: | ||
from setuptools.command.editable_wheel import editable_wheel | ||
except ImportError: | ||
compat_editable_wheel = None | ||
else: | ||
|
||
class compat_editable_wheel(editable_wheel): | ||
def initialize_options(self): | ||
super().initialize_options() | ||
# Enforce the "compat" editable mode which simply adds the project | ||
# directory to sys.path with a .pth file, so Odoo will detect the addon | ||
# in the odoo/addons directory/namespace package. | ||
self.mode = "compat" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters