-
-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create a ``.package`` virtual environment to perform build operations inside
- Loading branch information
1 parent
6259ff1
commit 17d57d1
Showing
22 changed files
with
352 additions
and
20 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,2 @@ | ||
- [PEP-517](https://www.python.org/dev/peps/pep-0517/) source distribution support (create a | ||
``.package`` virtual environment to perform build operations inside) by :user:`gaborbernat` |
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 @@ | ||
- flit support via implementing ``PEP-517`` |
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
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
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
Empty file.
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,71 @@ | ||
"""Tests that require external access (e.g. pip install, virtualenv creation)""" | ||
import subprocess | ||
|
||
import pytest | ||
|
||
from tests.lib import need_git | ||
|
||
|
||
@pytest.mark.network | ||
def test_package_isolated_build_setuptools(initproj, cmd): | ||
initproj( | ||
"package_toml_setuptools-0.1", | ||
filedefs={ | ||
"tox.ini": """ | ||
[tox] | ||
isolated_build = true | ||
[testenv:.package] | ||
basepython = python | ||
""", | ||
"pyproject.toml": """ | ||
[build-system] | ||
requires = ["setuptools >= 35.0.2", "setuptools_scm >= 2.0.0, <3"] | ||
build-backend = 'setuptools.build_meta' | ||
""", | ||
}, | ||
) | ||
result = cmd("--sdistonly") | ||
assert result.ret == 0, result.out | ||
|
||
result2 = cmd("--sdistonly") | ||
assert result2.ret == 0, result.out | ||
assert ".package recreate" not in result2.out | ||
|
||
|
||
@pytest.mark.network | ||
@need_git | ||
def test_package_isolated_build_flit(initproj, cmd): | ||
initproj( | ||
"package_toml_flit-0.1", | ||
filedefs={ | ||
"tox.ini": """ | ||
[tox] | ||
isolated_build = true | ||
[testenv:.package] | ||
basepython = python | ||
""", | ||
"pyproject.toml": """ | ||
[build-system] | ||
requires = ["flit"] | ||
build-backend = "flit.buildapi" | ||
[tool.flit.metadata] | ||
module = "package_toml_flit" | ||
author = "Happy Harry" | ||
author-email = "happy@harry.com" | ||
home-page = "https://github.com/happy-harry/is" | ||
""", | ||
".gitignore": ".tox", | ||
}, | ||
add_missing_setup_py=False, | ||
) | ||
subprocess.check_call(["git", "init"]) | ||
subprocess.check_call(["git", "add", "-A", "."]) | ||
subprocess.check_call(["git", "commit", "-m", "first commit"]) | ||
result = cmd("--sdistonly") | ||
assert result.ret == 0, result.out | ||
|
||
result2 = cmd("--sdistonly") | ||
|
||
assert result2.ret == 0, result.out | ||
assert ".package recreate" not in result2.out |
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,18 @@ | ||
import subprocess | ||
|
||
import pytest | ||
|
||
|
||
def need_executable(name, check_cmd): | ||
def wrapper(fn): | ||
try: | ||
subprocess.check_output(check_cmd) | ||
except OSError: | ||
return pytest.mark.skip(reason="%s is not available" % name)(fn) | ||
return fn | ||
|
||
return wrapper | ||
|
||
|
||
def need_git(fn): | ||
return pytest.mark.mercurial(need_executable("git", ("git", "--version"))(fn)) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.