Skip to content

Remove symlinks that point to build environment #5

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

Closed
wants to merge 2 commits into from

Conversation

Jc2k
Copy link
Contributor

@Jc2k Jc2k commented Oct 18, 2013

Inspecting the final deb with dpkg-deb -c I can see a couple of symlinks to the build environment. This turns them into empty directories.

@Jc2k
Copy link
Contributor Author

Jc2k commented Oct 18, 2013

GitHub seems to have eaten our comments when I flattened the patch :-(? Hopefully you saw my explanation in an e-mail?

I have linked to the source of the issue within my fix_ function - it is expected behaviour in newer versions that virtualenv creates absolute links from this 'local' directory. But after the virtualenv is built we can replace them with symlinks, which the newer patch does.

Looking at the tests I don't think they will run at the moment on my version of deb python. I would fix them, but I can't figure out how you run them.

@jhermann
Copy link
Contributor

See my pull request pypa/virtualenv#473. I had the same problem in a packaging tool, and don't know why they are absolute to start with.

@nailor
Copy link
Collaborator

nailor commented Oct 23, 2013

Your comment is acutally available in Jc2k/dh-virtualenv@9b6bcd9

I think the patch looks fine otherwise, but could you add some tests for that method?

@Jc2k
Copy link
Contributor Author

Jc2k commented Oct 23, 2013

I'd be happy to add tests, but i'm not sure how to run them! Can you describe your setup? And I think the tests expect a different version of DebPython to what I have - so i think they might all fail for me?

@nailor
Copy link
Collaborator

nailor commented Nov 5, 2013

Sorry for not responding this promptly.

Tests are currently just written to be run with nosetests, simple nosetests in the project root should run them. You'll need mock to be able to mock things.

@nailor
Copy link
Collaborator

nailor commented Dec 11, 2013

I've set up a travis now, but unfortunately it does not try testing old pull requests.

Did you manage to test this change?

@Jc2k
Copy link
Contributor Author

Jc2k commented Dec 11, 2013

I've been running that branch on my buildbot since i did the original pull request, but i haven't had time to write the tests. Definitely still on my radar though.

@nailor
Copy link
Collaborator

nailor commented Mar 20, 2014

I'm about to push out 0.7 version of this and symlink removal would probably make sense to be included. I'll try to look if I have some time to write tests on this, but of course highly appreciated if you come up with some :)

@nailor nailor added this to the 0.7 milestone Mar 20, 2014
@mshytikov
Copy link

+1 I have the same issue with virtualenv (v1.11.4), so looking forward for 0.7
As a temporary workaround I'm using this:

# debian/rules

export DH_ALWAYS_EXCLUDE=<package_name_here>/local

%:
        dh $@ --with python-virtualenv

@nailor nailor closed this in 92a0b81 May 1, 2014
@jhermann
Copy link
Contributor

See related #43

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.

4 participants