-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rewrite feedback #1481
Closed
Closed
rewrite feedback #1481
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0fc10bd
rewrite
gaborbernat 5ba186a
fix
gaborbernat 5204a3e
Improve executable discovery of a PythonInfo inside a given fol… (#1443)
saytosid a9dd418
Activation scripts for next-gen virtualenv (#1454)
saytosid 087ab62
add seed packages via pip invoke (#1462)
gaborbernat 897d318
use coverage 5 (#1463)
gaborbernat b3df716
Cross version compatibility (#1475)
gaborbernat 0dd42a8
unicode support (#1477)
gaborbernat aaf69cf
interface compatibility with before rewrite (#1479)
gaborbernat fbdd782
link app data needs ro with symlinks (#1480)
gaborbernat 41afcef
Update src/virtualenv/config/cli/parser.py
gaborbernat b9d4236
Update src/virtualenv/interpreters/create/cpython/site.py
gaborbernat 638081d
Update src/virtualenv/interpreters/discovery/py_info.py
gaborbernat e88fa1a
Update src/virtualenv/interpreters/discovery/py_spec.py
gaborbernat 6b842c7
Update src/virtualenv/interpreters/discovery/py_info.py
gaborbernat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,28 @@ | ||
[coverage:report] | ||
skip_covered = False | ||
show_missing = True | ||
exclude_lines = | ||
\#\s*pragma: no cover | ||
^\s*raise AssertionError\b | ||
^\s*raise NotImplementedError\b | ||
^\s*raise$ | ||
^if __name__ == ['"]__main__['"]:$ | ||
omit = | ||
# site.py is ran before the coverage can be enabled, no way to measure coverage on this | ||
src/virtualenv/interpreters/create/impl/cpython/site.py | ||
src/virtualenv/seed/embed/wheels/pip-*.whl/* | ||
|
||
[coverage:paths] | ||
source = | ||
src | ||
.tox/*/lib/python*/site-packages | ||
.tox/pypy*/site-packages | ||
.tox\*\Lib\site-packages\ | ||
*/src | ||
*\src | ||
|
||
[coverage:run] | ||
branch = false | ||
parallel = true | ||
source = | ||
${_COVERAGE_SRC} |
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 |
---|---|---|
|
@@ -19,3 +19,7 @@ dist | |
.vscode | ||
|
||
/docs/_draft.rst | ||
/pip-wheel-metadata | ||
/src/virtualenv/version.py | ||
/src/virtualenv/out | ||
/*env* |
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 |
---|---|---|
@@ -1,22 +1,12 @@ | ||
include virtualenv.py | ||
recursive-include virtualenv_support *.whl | ||
recursive-include virtualenv_embedded * | ||
include virtualenv_support/__init__.py | ||
include pyproject.toml | ||
|
||
include AUTHORS.txt | ||
include LICENSE.txt | ||
|
||
recursive-include tests * | ||
recursive-include docs * | ||
include tasks/* | ||
include tox.ini | ||
# setuptools-scm by default adds all SCM tracked files, we prune the following maintenance related ones (sdist only) | ||
exclude .gitattributes | ||
exclude .gitignore | ||
exclude .github/* | ||
|
||
exclude readthedocs.yml | ||
exclude CONTRIBUTING.rst | ||
exclude .pre-commit-config.yaml | ||
exclude azure-run-tox-env.yml | ||
exclude azure-pipelines.yml | ||
exclude .gitignore | ||
exclude .gitattributes | ||
recursive-exclude .github * | ||
exclude CONTRIBUTING.rst | ||
exclude readthedocs.yml | ||
exclude MANIFEST.in | ||
|
||
exclude tasks/release.py | ||
exclude tasks/upgrade_wheels.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,108 @@ | ||
[metadata] | ||
name = virtualenv | ||
version = attr: virtualenv.__version__ | ||
description = Virtual Python Environment builder | ||
long_description = file: README.rst | ||
keywords = virtual, environments, isolated | ||
maintainer = Bernat Gabor | ||
author = Ian Bicking | ||
author = Bernat Gabor | ||
maintainer-email = gaborjbernat@gmail.com | ||
author-email = ianb@colorstudy.com | ||
author-email = gaborjbernat@gmail.com | ||
url = https://virtualenv.pypa.io/ | ||
project_urls = | ||
Source=https://github.com/pypa/virtualenv | ||
Tracker=https://github.com/pypa/virtualenv/issues | ||
classifiers = Development Status :: 5 - Production/Stable | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: MIT License | ||
Operating System :: POSIX | ||
Operating System :: Microsoft :: Windows | ||
Operating System :: MacOS :: MacOS X | ||
Topic :: Software Development :: Testing | ||
Topic :: Software Development :: Libraries | ||
Topic :: Utilities | ||
Programming Language :: Python :: 2 | ||
Programming Language :: Python :: 2.7 | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.4 | ||
Programming Language :: Python :: 3.5 | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
classifiers = | ||
Development Status :: 3 - Alpha | ||
gaborbernat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.5 | ||
Programming Language :: Python :: 3.4 | ||
gaborbernat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 2 | ||
Programming Language :: Python :: 2.7 | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: MIT License | ||
Operating System :: POSIX | ||
Operating System :: Microsoft :: Windows | ||
Operating System :: MacOS :: MacOS X | ||
Topic :: Software Development :: Testing | ||
Topic :: Software Development :: Libraries | ||
Topic :: Utilities | ||
platforms = any | ||
license = MIT | ||
license_file = LICENSE.txt | ||
|
||
[options] | ||
packages = find: | ||
include_package_data = True | ||
package_dir = | ||
=src | ||
zip_safe = True | ||
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* | ||
install_requires = | ||
six >= 1.12.0, < 2 | ||
appdirs >= 1.4.3 | ||
entrypoints >= 0.3, <1 | ||
gaborbernat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
pathlib2 >= 2.3.3, < 3; python_version < '3.4' and sys.platform != 'win32' | ||
distlib >= 0.3.0, <1; sys.platform == 'win32' | ||
gaborbernat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
[options.packages.find] | ||
where = src | ||
|
||
[options.extras_require] | ||
testing = mock;python_version<"3.3" | ||
pytest >= 4.0.0, <5 | ||
coverage >= 4.5.0, <5 | ||
pytest-timeout >= 1.3.0, <2 | ||
xonsh; python_version>="3.5" | ||
six >= 1.10.0, < 2 | ||
pytest-xdist | ||
pytest-localserver | ||
pypiserver | ||
docs = sphinx >= 1.8.0, < 2 | ||
towncrier >= 18.5.0 | ||
sphinx_rtd_theme >= 0.4.2, < 1 | ||
|
||
[options.packages.find] | ||
where = . | ||
testing = | ||
pytest >= 4.0.0, <6 | ||
coverage >= 4.5.1, <6 | ||
pytest-mock >= 1.12.1, <2 | ||
xonsh >= 0.9.13, <1; python_version > '3.4' | ||
docs = | ||
sphinx >= 2.0.0, < 3 | ||
towncrier >= 18.5.0 | ||
sphinx_rtd_theme >= 0.4.2, < 1 | ||
|
||
[options.package_data] | ||
virtualenv_support = *.whl | ||
virtualenv.seed.embed.wheels = *.whl | ||
virtualenv.activation.bash = *.sh | ||
virtualenv.activation.cshell = *.csh | ||
virtualenv.activation.batch = *.bat | ||
virtualenv.activation.fish = *.fish | ||
virtualenv.activation.powershell = *.ps1 | ||
virtualenv.activation.xonosh = *.xsh | ||
gaborbernat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[options.entry_points] | ||
console_scripts = virtualenv=virtualenv:main | ||
|
||
console_scripts = | ||
virtualenv=virtualenv.__main__:run | ||
virtualenv.discovery = | ||
builtin = virtualenv.interpreters.discovery.builtin:Builtin | ||
virtualenv.create = | ||
cpython3-posix = virtualenv.interpreters.create.cpython.cpython3:CPython3Posix | ||
cpython3-win = virtualenv.interpreters.create.cpython.cpython3:CPython3Windows | ||
cpython2-posix = virtualenv.interpreters.create.cpython.cpython2:CPython2Posix | ||
cpython2-win = virtualenv.interpreters.create.cpython.cpython2:CPython2Windows | ||
venv = virtualenv.interpreters.create.venv:Venv | ||
virtualenv.seed = | ||
none = virtualenv.seed.none:NoneSeeder | ||
pip = virtualenv.seed.embed.pip_invoke:PipInvoke | ||
app-data = virtualenv.seed.via_app_data.via_app_data:FromAppData | ||
virtualenv.activate = | ||
bash = virtualenv.activation.bash:BashActivator | ||
cshell = virtualenv.activation.cshell:CShellActivator | ||
batch = virtualenv.activation.batch:BatchActivator | ||
fish = virtualenv.activation.fish:FishActivator | ||
power-shell = virtualenv.activation.powershell:PowerShellActivator | ||
gaborbernat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
python = virtualenv.activation.python:PythonActivator | ||
xonosh = virtualenv.activation.xonosh:XonoshActivator | ||
gaborbernat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
[sdist] | ||
formats = gztar | ||
|
||
[bdist_wheel] | ||
universal = true | ||
|
||
[coverage:run] | ||
branch = false | ||
parallel = true | ||
|
||
[coverage:report] | ||
skip_covered = True | ||
show_missing = True | ||
|
||
[coverage:paths] | ||
source = . | ||
.tox/*/*/site-packages | ||
.tox/*/*/*/site-packages | ||
*/s | ||
[tool:pytest] | ||
markers = | ||
bash | ||
csh | ||
fish | ||
pwsh | ||
xonsh | ||
junit_family = xunit2 |
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 |
---|---|---|
@@ -1,16 +1,17 @@ | ||
import os | ||
import re | ||
# -*- coding: utf-8 -*- | ||
import textwrap | ||
|
||
from setuptools import setup | ||
|
||
|
||
def get_version(): | ||
with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "virtualenv.py")) as file_handler: | ||
version_file = file_handler.read() | ||
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) | ||
if version_match: | ||
return version_match.group(1) | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
setup(version=get_version(), py_modules=["virtualenv"], setup_requires=["setuptools >= 40.6.3"]) | ||
setup( | ||
use_scm_version={ | ||
"write_to": "src/virtualenv/version.py", | ||
"write_to_template": textwrap.dedent( | ||
""" | ||
# coding: utf-8 | ||
from __future__ import unicode_literals | ||
__version__ = {version!r} | ||
gaborbernat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
""" | ||
).lstrip(), | ||
} | ||
) |
File renamed without changes.
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,5 @@ | ||
from __future__ import absolute_import, unicode_literals | ||
|
||
from .version import __version__ | ||
|
||
__all__ = ("__version__", "run") |
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,22 @@ | ||
from __future__ import absolute_import, print_function, unicode_literals | ||
|
||
import sys | ||
|
||
from virtualenv.error import ProcessCallFailed | ||
from virtualenv.run import run_via_cli | ||
|
||
|
||
def run(args=None): | ||
if args is None: | ||
args = sys.argv[1:] | ||
try: | ||
run_via_cli(args) | ||
except ProcessCallFailed as exception: | ||
print("subprocess call failed for {}".format(exception.cmd)) | ||
print(exception.out, file=sys.stdout, end="") | ||
print(exception.err, file=sys.stderr, end="") | ||
raise SystemExit(exception.code) | ||
|
||
|
||
if __name__ == "__main__": | ||
run() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it's worth it to make this work, an orphan branch (see https://stackoverflow.com/a/30284471/1931274 for how to). Then we'd rename the current
master
tolegacy
(+ add a tag) and renamerewrite
tomaster
instead of doing a merge. :PThat'd also allow for the rewrite to be more representative of the degree of work. :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm pushing an orphan branch takes a while 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
orphan branch created under https://github.com/pypa/virtualenv/commits/rewrite