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] Handle editable namespace packages properly #4576

Closed

Conversation

pradyunsg
Copy link
Member

Would eventually fix #4176

@pradyunsg pradyunsg self-assigned this Jun 27, 2017
@pradyunsg
Copy link
Member Author

I am unable to reproduce a -nspkg.pth file being created.

/ping @jaraco Could you help me out?

path.endswith('-nspkg.pth')
for path in result.files_created
)
assert nspkg_created_count == 1, result.files_created.keys()
Copy link
Member Author

Choose a reason for hiding this comment

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

There's only a single .egg-link file being created.

@pradyunsg pradyunsg added type: enhancement Improvements to functionality state: needs discussion This needs some more discussion project: setuptools Related to setuptools labels Jun 28, 2017
@jaraco
Copy link
Member

jaraco commented Jul 26, 2017

I think the issue is that you're not declaring namespace_packages=['namespace'] in the setup.py. That's what triggers creation of nspkg.pth files.

@pradyunsg
Copy link
Member Author

pradyunsg commented Jul 27, 2017

Thanks @jaraco! ^.^

I had missed that. I'll give it a shot. :)

@pradyunsg pradyunsg force-pushed the handle-namespace-packages-properly branch from 75abc94 to 8f459a3 Compare August 19, 2017 07:06
@pradyunsg pradyunsg removed the state: needs discussion This needs some more discussion label Aug 19, 2017
@pradyunsg
Copy link
Member Author

Status - the test for nspkg is now working (as in it checks behaviour; currently failing since that's not implemented). Same for the pkgutil-namespaces.

@pradyunsg
Copy link
Member Author

pradyunsg commented Aug 19, 2017

@jonparrott The files you had contributed have your License header; I think that'll need to be removed.

Further, it's actually possible to simplify the setup.py to not have anything except the bare minimum needed (i.e. remove your information from it, description & long_description and the license).

Just confirming -- are you fine with that? :)


Note to self - the relevant change is stashed as "remove @jonparrott's license and simplify".

@theacodes
Copy link
Member

I am not a lawyer, but I think in general license headers should stay (as to not obscure or relicense the code).

I personally don't care either way.

@pradyunsg
Copy link
Member Author

pradyunsg commented Aug 21, 2017

I am not a lawyer

Same. I dunno if those headers can stay there tho. My intuition says that a file with a header like that shouldn't live in pip's codebase. But my intuition may not be legally sound. 🤷‍♂️

I'll wait for @dstufft or @pfmoore or anyone else really tell me what the right thing to do here would be.

@pradyunsg
Copy link
Member Author

I'll remove that test and those files for now. I've made #4689 for this and also re-opened #4504.

@pradyunsg pradyunsg changed the title [WIP] Handle namespace packages properly [WIP] Handle editable namespace packages properly Aug 23, 2017
@pradyunsg pradyunsg removed their assignment Oct 5, 2017
@di
Copy link
Sponsor Member

di commented Oct 12, 2017

@pradyunsg I see you recently un-assigned this from yourself, are you planning to continue work on this issue, or is it pick-up-able?

@pradyunsg
Copy link
Member Author

is it pick-up-able?

@di Very much so. :)

Some more context: #4625 and #4689

@pradyunsg pradyunsg force-pushed the handle-namespace-packages-properly branch from 15275aa to f45caeb Compare October 12, 2017 16:00
@pradyunsg
Copy link
Member Author

@di I've squashed all the stuff into a single commit; I think that'll be cleaner if you (or anyone) takes it forward. :)

@pradyunsg
Copy link
Member Author

(maybe the tests should use pip install -e ...)

@pradyunsg pradyunsg added the state: awaiting PR Feature discussed, PR is needed label Oct 12, 2017
@pradyunsg
Copy link
Member Author

Closing this. If anyone wants to take #4176 forward, you can use the test from here.

@pradyunsg pradyunsg closed this Jan 23, 2018
@pradyunsg pradyunsg deleted the handle-namespace-packages-properly branch January 23, 2018 20:43
@pradyunsg pradyunsg restored the handle-namespace-packages-properly branch May 27, 2018 09:38
@pradyunsg pradyunsg deleted the handle-namespace-packages-properly branch June 17, 2018 06:48
@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation project: setuptools Related to setuptools state: awaiting PR Feature discussed, PR is needed type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uninstall -nspkg.pth files installed with setup.py develop
4 participants