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
dad6cda2
Unverified
Commit
dad6cda2
authored
Apr 26, 2019
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix root package installation for pure Python packages
parent
b8e5361c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
85 deletions
+8
-85
CHANGELOG.md
+7
-0
poetry/masonry/builders/editable.py
+1
-8
tests/masonry/builders/test_editable.py
+0
-77
No files found.
CHANGELOG.md
View file @
dad6cda2
# Change Log
## [Unreleased]
### Fixed
-
Fixed root package installation for pure Python packages.
## [0.12.13] - 2019-04-26
### Fixed
...
...
poetry/masonry/builders/editable.py
View file @
dad6cda2
...
...
@@ -14,14 +14,7 @@ from .sdist import SdistBuilder
class
EditableBuilder
(
Builder
):
def
build
(
self
):
if
self
.
_package
.
build
:
# If the project has some kind of special
# build needs we delegate to the setup.py file
return
self
.
_setup_build
()
self
.
_build_egg_info
()
self
.
_build_egg_link
()
self
.
_add_easy_install_entry
()
return
self
.
_setup_build
()
def
_setup_build
(
self
):
builder
=
SdistBuilder
(
self
.
_poetry
,
self
.
_env
,
self
.
_io
)
...
...
tests/masonry/builders/test_editable.py
View file @
dad6cda2
...
...
@@ -10,83 +10,6 @@ from poetry.utils.env import MockEnv
fixtures_dir
=
Path
(
__file__
)
.
parent
/
"fixtures"
def
test_build_pure_python_package
(
tmp_dir
):
tmp_dir
=
Path
(
tmp_dir
)
env
=
MockEnv
(
path
=
tmp_dir
)
env
.
site_packages
.
mkdir
(
parents
=
True
)
module_path
=
fixtures_dir
/
"complete"
builder
=
EditableBuilder
(
Poetry
.
create
(
module_path
),
env
,
NullIO
())
builder
.
_path
=
tmp_dir
builder
.
build
()
egg_info
=
tmp_dir
/
"my_package.egg-info"
assert
egg_info
.
exists
()
entry_points
=
"""
\
[console_scripts]
extra-script=my_package.extra:main[time]
my-2nd-script=my_package:main2
my-script=my_package:main
"""
pkg_info
=
"""
\
Metadata-Version: 2.1
Name: my-package
Version: 1.2.3
Summary: Some description.
Home-page: https://poetry.eustace.io/
License: MIT
Keywords: packaging,dependency,poetry
Author: Sébastien Eustace
Author-email: sebastien@eustace.io
Requires-Python: >=3.6,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Provides-Extra: time
Requires-Dist: cachy[msgpack] (>=0.2.0,<0.3.0)
Requires-Dist: cleo (>=0.6,<0.7)
Requires-Dist: pendulum (>=1.4,<2.0); extra == "time"
Project-URL: Documentation, https://poetry.eustace.io/docs
Project-URL: Repository, https://github.com/sdispater/poetry
Description-Content-Type: text/x-rst
My Package
==========
"""
requires
=
"""
\
cachy[msgpack] (>=0.2.0,<0.3.0)
cleo (>=0.6,<0.7)
pendulum (>=1.4,<2.0)
"""
with
egg_info
.
joinpath
(
"entry_points.txt"
)
.
open
(
encoding
=
"utf-8"
)
as
f
:
assert
entry_points
==
f
.
read
()
with
egg_info
.
joinpath
(
"PKG-INFO"
)
.
open
(
encoding
=
"utf-8"
)
as
f
:
assert
pkg_info
==
f
.
read
()
with
egg_info
.
joinpath
(
"requires.txt"
)
.
open
(
encoding
=
"utf-8"
)
as
f
:
assert
requires
==
f
.
read
()
egg_link
=
env
.
site_packages
/
"my-package.egg-link"
with
egg_link
.
open
(
encoding
=
"utf-8"
)
as
f
:
assert
str
(
module_path
)
+
"
\n
."
==
f
.
read
()
easy_install
=
env
.
site_packages
/
"easy-install.pth"
with
easy_install
.
open
(
encoding
=
"utf-8"
)
as
f
:
assert
str
(
module_path
)
+
"
\n
"
in
f
.
readlines
()
def
test_build_should_delegate_to_pip_for_non_pure_python_packages
(
tmp_dir
,
mocker
):
move
=
mocker
.
patch
(
"shutil.move"
)
tmp_dir
=
Path
(
tmp_dir
)
...
...
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