diff options
| author | Bernát Gábor <bgabor8@bloomberg.net> | 2020-01-18 17:07:49 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-18 17:07:49 +0000 |
| commit | 8d6af57d76edcf425beab6d53d4c14f1e49f7ca5 (patch) | |
| tree | de400611862464320c6a45a932e27c2bac0c63ea /src/virtualenv/util/path/_sync.py | |
| parent | 8f4128879b26921af2ec0f0f3f690ed2324bfb04 (diff) | |
| download | virtualenv-8d6af57d76edcf425beab6d53d4c14f1e49f7ca5.tar.gz | |
CentOs and Fedora support (#1500)
* CentOs support
Instead of hard coding patterns and guessing let's ask the host python
via the sysconfig.
Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
* add isolated test
Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
* fixes for Fedora
Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
Diffstat (limited to 'src/virtualenv/util/path/_sync.py')
| -rw-r--r-- | src/virtualenv/util/path/_sync.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/virtualenv/util/path/_sync.py b/src/virtualenv/util/path/_sync.py index 860aee1..4c5aa86 100644 --- a/src/virtualenv/util/path/_sync.py +++ b/src/virtualenv/util/path/_sync.py @@ -23,6 +23,10 @@ def symlink_or_copy(do_copy, src, dst, relative_symlinks_ok=False): """ Try symlinking a target, and if that fails, fall back to copying. """ + if not src.exists(): + raise RuntimeError("source {} does not exists".format(src)) + if src == dst: + raise RuntimeError("source {} is same as destination ".format(src)) def norm(val): if IS_PYPY and six.PY3: |
