Skip to content
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

[WIP] Fix for copying Py2 deps. Unlike py3, tox creates symlinks for py2 #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JamieCressey
Copy link
Contributor

No description provided.

@JamieCressey JamieCressey changed the title Fix for copying Py2 deps. Unlike py3, tox creates symlinks for py2 [WIP] Fix for copying Py2 deps. Unlike py3, tox creates symlinks for py2 Jan 16, 2016
@@ -31,7 +31,13 @@ def install_debian_deps(path, deps, opts, action):
tmp_usr = path_join(tmp_dir, 'usr')
if isdir(tmp_usr):
action.setactivity('copy', ', '.join(__iter_files(tmp_usr)))
action.popen(['cp', '-r'] + listdir(tmp_usr) + [path], cwd=tmp_usr)
_dirs = listdir(tmp_usr)
if 'py2' in path:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be wrong here, but I'm wondering if this reliable enough. Maybe we could use action.venv to find out if it's a Python 2 environment or ask the Python interpreter inside the env for its version or something. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, it's not ideal. I'll see what action.venv provides.
On 17 Jan 2016 11:45, "Attila Magyar" [email protected] wrote:

In tox_DEBIAN/install.py
#9 (comment)
:

@@ -31,7 +31,13 @@ def install_debian_deps(path, deps, opts, action):
tmp_usr = path_join(tmp_dir, 'usr')
if isdir(tmp_usr):
action.setactivity('copy', ', '.join(__iter_files(tmp_usr)))

  •        action.popen(['cp', '-r'] + listdir(tmp_usr) + [path], cwd=tmp_usr)
    
  •        _dirs = listdir(tmp_usr)
    
  •        if 'py2' in path:
    

I might be wrong here, but I'm wondering if this reliable enough. Maybe we
could use action.venv to find out if it's a Python 2 environment or ask
the Python interpreter inside the env for its version or something. What do
you think?


Reply to this email directly or view it on GitHub
https://github.com/balabit/tox-debian-plugin/pull/9/files#r49945046.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants