Commit 148cace6 authored by Jason R. Coombs's avatar Jason R. Coombs

Merge branch 'master' into distutils-import-hack

parents 6b70fb20 59e116c8
[bumpversion] [bumpversion]
current_version = 49.2.0 current_version = 49.2.1
commit = True commit = True
tag = True tag = True
......
---
name: Bug Report or Feature Request
about: Report a bug or request a feature
---
---
name: Setuptools warns about Python 2 incompatibility
about: Report the issue where setuptools 45 or later stops working on Python 2
title: Incompatible install in (summarize your environment)
labels: Python 2
assignees: ''
---
<!--
Please DO NOT SUBMIT this template without first investigating the issue and answering the questions below. This template is intended mainly for developers of systems and not for end users. If you are an end user experiencing the warning, please work with your system maintainers (starting with the project you're trying to use) to report the issue.
If you did not intend to use this template, but only meant to file a blank issue, just hit the back button and click "Open a blank issue".
Setuptools 45 dropped support for Python 2 with a strenuous warning and Setuptools 47 fails to run on Python 2.
In most cases, using pip 9 or later to install Setuptools from PyPI or any index supporting the Requires-Python metadata will do the right thing and install Setuptools 44.x on Python 2.
If you've come to file an issue, it's probably because some process managed to bypass these protections.
Your first course of action should be to reason about how you managed to get an unsupported version of Setuptools on Python 2. Please complete the sections below and provide any other detail about your environment that will help us help you.
-->
## Prerequisites
<!-- These are the recommended workarounds for the issue. Please
try them first. -->
- [ ] Read [Python 2 Sunset docs](https://setuptools.readthedocs.io/en/latest/python%202%20sunset.html).
- [ ] Python 2 is required for this application.
- [ ] I maintain the software that installs Setuptools (if not, please contact that project).
- [ ] Setuptools installed with pip 9 or later.
- [ ] Pinning Setuptools to `setuptools<45` in the environment was unsuccessful.
## Environment Details
- Operating System and version:
- Python version:
- Python installed how:
- Virtualenv version (if using virtualenv): n/a
Command(s) that triggered the warning/error (and output):
```
```
Command(s) used to install setuptools (and output):
```
```
Output of `pip --version` when installing setuptools:
```
```
## Other notes
...@@ -25,32 +25,54 @@ jobs: ...@@ -25,32 +25,54 @@ jobs:
- 3.6 - 3.6
- 3.5 - 3.5
os: os:
- ubuntu-latest - ubuntu-18.04
- ubuntu-16.04 - ubuntu-16.04
- macOS-latest - macOS-latest
# - windows-2019 # - windows-2019
# - windows-2016 # - windows-2016
include: include:
# Dev versions # Pre-release versions (GH-shipped)
- { python-version: 3.9-dev, os: ubuntu-20.04 } - os: ubuntu-20.04
python-version: 3.9.0-beta.4 - 3.9.0
# Pre-release versions (deadsnakes)
- os: ubuntu-20.04
python-version: 3.9-beta
# Dev versions (deadsnakes)
- os: ubuntu-20.04
python-version: 3.9-dev
- os: ubuntu-20.04
python-version: 3.8-dev
env: env:
NETWORK_REQUIRED: 1 NETWORK_REQUIRED: 1
PYTHON_VERSION: ${{ matrix.python-version }}
TOX_PARALLEL_NO_SPINNER: 1 TOX_PARALLEL_NO_SPINNER: 1
TOXENV: python TOXENV: python
USE_DEADSNAKES: false
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }} (deadsnakes) - name: Set flag to use deadsnakes
if: >-
endsWith(env.PYTHON_VERSION, '-beta') ||
endsWith(env.PYTHON_VERSION, '-dev')
run: |
from __future__ import print_function
python_version = '${{ env.PYTHON_VERSION }}'.replace('-beta', '')
print('::set-env name=PYTHON_VERSION::{ver}'.format(ver=python_version))
print('::set-env name=USE_DEADSNAKES::true')
shell: python
- name: Set up Python ${{ env.PYTHON_VERSION }} (deadsnakes)
uses: deadsnakes/action@v1.0.0 uses: deadsnakes/action@v1.0.0
if: endsWith(matrix.python-version, '-dev') if: fromJSON(env.USE_DEADSNAKES) && true || false
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ env.PYTHON_VERSION }}
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1.1.1 uses: actions/setup-python@v2.1.1
if: "!endsWith(matrix.python-version, '-dev')" if: >-
!fromJSON(env.USE_DEADSNAKES) && true || false
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ env.PYTHON_VERSION }}
- name: Log Python version - name: Log Python version
run: >- run: >-
python --version python --version
...@@ -82,9 +104,9 @@ jobs: ...@@ -82,9 +104,9 @@ jobs:
run: >- run: >-
python -m pip freeze --all python -m pip freeze --all
- name: Adjust TOXENV for PyPy - name: Adjust TOXENV for PyPy
if: startsWith(matrix.python-version, 'pypy') if: startsWith(env.PYTHON_VERSION, 'pypy')
run: >- run: >-
echo "::set-env name=TOXENV::${{ matrix.python-version }}" echo "::set-env name=TOXENV::${{ env.PYTHON_VERSION }}"
- name: Log env vars - name: Log env vars
run: >- run: >-
env env
...@@ -100,6 +122,7 @@ jobs: ...@@ -100,6 +122,7 @@ jobs:
python -m python -m
tox tox
--parallel auto --parallel auto
--parallel-live
--notest --notest
--skip-missing-interpreters false --skip-missing-interpreters false
- name: Test with tox - name: Test with tox
...@@ -107,3 +130,6 @@ jobs: ...@@ -107,3 +130,6 @@ jobs:
python -m python -m
tox tox
--parallel auto --parallel auto
--parallel-live
--
-vvvvv
v49.2.1
-------
* #2257: Fixed two flaws in distutils._msvccompiler.MSVCCompiler.spawn.
v49.2.0 v49.2.0
------- -------
......
.. image:: https://raw.githubusercontent.com/pypa/setuptools/master/docs/logo/banner%201%20line%20color.svg
.. image:: https://img.shields.io/pypi/v/setuptools.svg .. image:: https://img.shields.io/pypi/v/setuptools.svg
:target: `PyPI link`_ :target: `PyPI link`_
...@@ -27,7 +24,6 @@ ...@@ -27,7 +24,6 @@
.. image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat .. image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat
:target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme :target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme
See the `Installation Instructions See the `Installation Instructions
<https://packaging.python.org/installing/>`_ in the Python Packaging <https://packaging.python.org/installing/>`_ in the Python Packaging
User's Guide for instructions on installing, upgrading, and uninstalling User's Guide for instructions on installing, upgrading, and uninstalling
...@@ -58,4 +54,4 @@ Code of Conduct ...@@ -58,4 +54,4 @@ Code of Conduct
Everyone interacting in the setuptools project's codebases, issue trackers, Everyone interacting in the setuptools project's codebases, issue trackers,
chat rooms, and mailing lists is expected to follow the chat rooms, and mailing lists is expected to follow the
`PyPA Code of Conduct <https://www.pypa.io/en/latest/code-of-conduct/>`_. `PSF Code of Conduct <https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md>`_.
Porting from Distutils
======================
Setuptools and the PyPA have a `stated goal <https://github.com/pypa/packaging-problems/issues/127>`_ to make Setuptools the reference API for distutils.
Since the 49.1.2 release, Setuptools includes a local, vendored copy of distutils (from late copies of CPython) that is disabled by default. To enable the use of this copy of distutils when invoking setuptools, set the enviroment variable:
SETUPTOOLS_USE_DISTUTILS=local
This behavior is planned to become the default.
Prefer Setuptools
-----------------
As Distutils is deprecated, any usage of functions or objects from distutils is similarly discouraged, and Setuptools aims to replace or deprecate all such uses. This section describes the recommended replacements.
``distutils.core.setup`` → ``setuptools.setup``
``distutils.cmd.Command`` → ``setuptools.Command``
``distutils.log`` → (no replacement yet)
``distutils.version.*`` → ``packaging.version.*``
If a project relies on uses of ``distutils`` that do not have a suitable replacement above, please search the `Setuptools issue tracker <https://github.com/pypa/setuptools/issues/>`_ and file a request, describing the use-case so that Setuptools' maintainers can investigate. Please provide enough detail to help the maintainers understand how distutils is used, what value it provides, and why that behavior should be supported.
.. image:: https://raw.githubusercontent.com/pypa/setuptools/master/docs/logo/banner%201%20line%20color.svg
Documentation Documentation
============= =============
...@@ -18,4 +15,5 @@ Documentation content: ...@@ -18,4 +15,5 @@ Documentation content:
development development
roadmap roadmap
Deprecated: Easy Install <easy_install> Deprecated: Easy Install <easy_install>
distutils-legacy
history history
![](setup_tools_logo_colour.svg)
### Design:
Setuptools logo designed in 2020 by [C.Rogers](crogersmedia.com) for the Setuptools project using the Free Open Source graphics editor [Inkscape](inkscape.org).
### Copyright:
Logo is (c) the Setuptools developers.
### Font:
The font used is the Open Font "Josefin Sans", which is available for free under the Open Font License (OFL).
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
922c129c-9f4c-4831-b632-c7f43be6feb0
\ No newline at end of file
<p>
The idea of this typeface is to be geometric, elegant, with a vintage feeling, for use at larger sizes.
It is inspired by geometric sans serif designs from the 1920s.
The x-height is half way from baseline to cap height, an unusual proportion.
</p>
<p>
There is a sister family, <a href="https://fonts.google.com/specimen/Josefin+Slab">Josefin Slab</a>
</p>
name: "Josefin Sans"
designer: "Santiago Orozco"
license: "OFL"
category: "SANS_SERIF"
date_added: "2010-11-17"
fonts {
name: "Josefin Sans"
style: "normal"
weight: 100
filename: "JosefinSans-Thin.ttf"
post_script_name: "JosefinSans-Thin"
full_name: "Josefin Sans Thin"
copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"."
}
fonts {
name: "Josefin Sans"
style: "italic"
weight: 100
filename: "JosefinSans-ThinItalic.ttf"
post_script_name: "JosefinSans-ThinItalic"
full_name: "Josefin Sans Thin Italic"
copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"."
}
fonts {
name: "Josefin Sans"
style: "normal"
weight: 300
filename: "JosefinSans-Light.ttf"
post_script_name: "JosefinSans-Light"
full_name: "Josefin Sans Light"
copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"."
}
fonts {
name: "Josefin Sans"
style: "italic"
weight: 300
filename: "JosefinSans-LightItalic.ttf"
post_script_name: "JosefinSans-LightItalic"
full_name: "Josefin Sans Light Italic"
copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"."
}
fonts {
name: "Josefin Sans"
style: "normal"
weight: 400
filename: "JosefinSans-Regular.ttf"
post_script_name: "JosefinSans-Regular"
full_name: "Josefin Sans Regular"
copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"."
}
fonts {
name: "Josefin Sans"
style: "italic"
weight: 400
filename: "JosefinSans-Italic.ttf"
post_script_name: "JosefinSans-Italic"
full_name: "Josefin Sans Italic"
copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"."
}
fonts {
name: "Josefin Sans"
style: "normal"
weight: 600
filename: "JosefinSans-SemiBold.ttf"
post_script_name: "JosefinSans-SemiBold"
full_name: "Josefin Sans SemiBold"
copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"."
}
fonts {
name: "Josefin Sans"
style: "italic"
weight: 600
filename: "JosefinSans-SemiBoldItalic.ttf"
post_script_name: "JosefinSans-SemiBoldItalic"
full_name: "Josefin Sans SemiBold Italic"
copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"."
}
fonts {
name: "Josefin Sans"
style: "normal"
weight: 700
filename: "JosefinSans-Bold.ttf"
post_script_name: "JosefinSans-Bold"
full_name: "Josefin Sans Bold"
copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"."
}
fonts {
name: "Josefin Sans"
style: "italic"
weight: 700
filename: "JosefinSans-BoldItalic.ttf"
post_script_name: "JosefinSans-BoldItalic"
full_name: "Josefin Sans Bold Italic"
copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"."
}
subsets: "latin"
subsets: "latin-ext"
subsets: "menu"
subsets: "vietnamese"
Copyright (c) 2010, Santiago Orozco (hi@typemade.mx)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
This diff is collapsed.
This diff is collapsed.
...@@ -16,7 +16,7 @@ formats = zip ...@@ -16,7 +16,7 @@ formats = zip
[metadata] [metadata]
name = setuptools name = setuptools
version = 49.2.0 version = 49.2.1
description = Easily download, build, install, upgrade, and uninstall Python packages description = Easily download, build, install, upgrade, and uninstall Python packages
author = Python Packaging Authority author = Python Packaging Authority
author_email = distutils-sig@python.org author_email = distutils-sig@python.org
...@@ -72,6 +72,7 @@ tests = ...@@ -72,6 +72,7 @@ tests =
paver; python_version>="3.6" paver; python_version>="3.6"
futures; python_version=="2.7" futures; python_version=="2.7"
pip>=19.1 # For proper file:// URLs support. pip>=19.1 # For proper file:// URLs support.
jaraco.envs
docs = docs =
# Keep these in sync with docs/requirements.txt # Keep these in sync with docs/requirements.txt
......
...@@ -15,7 +15,9 @@ for older versions in distutils.msvc9compiler and distutils.msvccompiler. ...@@ -15,7 +15,9 @@ for older versions in distutils.msvc9compiler and distutils.msvccompiler.
import os import os
import subprocess import subprocess
import winreg import contextlib
with contextlib.suppress(ImportError):
import winreg
from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ from distutils.errors import DistutilsExecError, DistutilsPlatformError, \
CompileError, LibError, LinkError CompileError, LibError, LinkError
...@@ -501,7 +503,7 @@ class MSVCCompiler(CCompiler) : ...@@ -501,7 +503,7 @@ class MSVCCompiler(CCompiler) :
log.debug("skipping %s (up-to-date)", output_filename) log.debug("skipping %s (up-to-date)", output_filename)
def spawn(self, cmd): def spawn(self, cmd):
env = dict(os.environ, path=self._paths) env = dict(os.environ, PATH=self._paths)
return super().spawn(cmd, env=env) return super().spawn(cmd, env=env)
# -- Miscellaneous methods ----------------------------------------- # -- Miscellaneous methods -----------------------------------------
......
...@@ -906,8 +906,8 @@ int main (int argc, char **argv) { ...@@ -906,8 +906,8 @@ int main (int argc, char **argv) {
def execute(self, func, args, msg=None, level=1): def execute(self, func, args, msg=None, level=1):
execute(func, args, msg, self.dry_run) execute(func, args, msg, self.dry_run)
def spawn(self, cmd): def spawn(self, cmd, **kwargs):
spawn(cmd, dry_run=self.dry_run) spawn(cmd, dry_run=self.dry_run, **kwargs)
def move_file(self, src, dst): def move_file(self, src, dst):
return move_file(src, dst, dry_run=self.dry_run) return move_file(src, dst, dry_run=self.dry_run)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import sys import sys
import unittest import unittest
import os import os
import threading
from distutils.errors import DistutilsPlatformError from distutils.errors import DistutilsPlatformError
from distutils.tests import support from distutils.tests import support
...@@ -74,6 +75,42 @@ class msvccompilerTestCase(support.TempdirManager, ...@@ -74,6 +75,42 @@ class msvccompilerTestCase(support.TempdirManager,
else: else:
raise unittest.SkipTest("VS 2015 is not installed") raise unittest.SkipTest("VS 2015 is not installed")
class CheckThread(threading.Thread):
exc_info = None
def run(self):
try:
super().run()
except Exception:
self.exc_info = sys.exc_info()
def __bool__(self):
return not self.exc_info
class TestSpawn(unittest.TestCase):
def test_concurrent_safe(self):
"""
Concurrent calls to spawn should have consistent results.
"""
import distutils._msvccompiler as _msvccompiler
compiler = _msvccompiler.MSVCCompiler()
compiler._paths = "expected"
inner_cmd = 'import os; assert os.environ["PATH"] == "expected"'
command = ['python', '-c', inner_cmd]
threads = [
CheckThread(target=compiler.spawn, args=[command])
for n in range(100)
]
for thread in threads:
thread.start()
for thread in threads:
thread.join()
assert all(threads)
def test_suite(): def test_suite():
return unittest.makeSuite(msvccompilerTestCase) return unittest.makeSuite(msvccompilerTestCase)
......
...@@ -138,7 +138,7 @@ def patch_for_msvc_specialized_compiler(): ...@@ -138,7 +138,7 @@ def patch_for_msvc_specialized_compiler():
msvc = import_module('setuptools.msvc') msvc = import_module('setuptools.msvc')
if platform.system() != 'Windows': if platform.system() != 'Windows':
# Compilers only availables on Microsoft Windows # Compilers only available on Microsoft Windows
return return
def patch_params(mod_name, func_name): def patch_params(mod_name, func_name):
......
...@@ -10,3 +10,4 @@ pytest-cov>=2.5.1 ...@@ -10,3 +10,4 @@ pytest-cov>=2.5.1
paver; python_version>="3.6" paver; python_version>="3.6"
futures; python_version=="2.7" futures; python_version=="2.7"
pip>=19.1 # For proper file:// URLs support. pip>=19.1 # For proper file:// URLs support.
jaraco.envs
import os
import sys
import functools
import subprocess
import platform
import pytest
import jaraco.envs
import path
class VirtualEnv(jaraco.envs.VirtualEnv):
name = '.env'
def run(self, cmd, *args, **kwargs):
cmd = [self.exe(cmd[0])] + cmd[1:]
return subprocess.check_output(cmd, *args, cwd=self.root, **kwargs)
@pytest.fixture
def venv(tmpdir):
env = VirtualEnv()
env.root = path.Path(tmpdir)
env.req = os.getcwd()
return env.create()
def popen_text(call):
"""
Augment the Popen call with the parameters to ensure unicode text.
"""
return functools.partial(call, universal_newlines=True) \
if sys.version_info < (3, 7) else functools.partial(call, text=True)
def find_distutils(venv, imports='distutils', env=None, **kwargs):
py_cmd = 'import {imports}; print(distutils.__file__)'.format(**locals())
cmd = ['python', '-c', py_cmd]
if platform.system() == 'Windows':
env['SYSTEMROOT'] = os.environ['SYSTEMROOT']
return popen_text(venv.run)(cmd, env=env, **kwargs)
def test_distutils_stdlib(venv):
"""
Ensure stdlib distutils is used when appropriate.
"""
assert venv.name not in find_distutils(venv, env=dict()).split(os.sep)
def test_distutils_local_with_setuptools(venv):
"""
Ensure local distutils is used when appropriate.
"""
env = dict(SETUPTOOLS_USE_DISTUTILS='local')
loc = find_distutils(venv, imports='setuptools, distutils', env=env)
assert venv.name in loc.split(os.sep)
@pytest.mark.xfail(reason="#2259")
def test_distutils_local(venv):
env = dict(SETUPTOOLS_USE_DISTUTILS='local')
assert venv.name in find_distutils(venv, env=env).split(os.sep)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment