PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Friday the 18th of October, 2019

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[15:07:03] <mrquincy> I'm learning basic python packaging in order to contribute to an established project. I'm confused about interactions between pip and setuptools. When I "pip install -e <DIR>" inside a virtual env, I don't see where things are actually installed.
[15:07:21] <mrquincy> I see the script I expect in my virtualenv path, but it just sets an entry point and exits.
[15:07:46] <mrquincy> There's a related file in lib/.../site-packages/, but it's just an egg link to the "." directory.
[15:08:14] <mrquincy> Is there some reading you all can suggest based on my misunderstandings?
[15:10:23] <mgedmin> mrquincy: https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode
[15:10:45] <mrquincy> I'm on it. Thank you.
[15:11:39] <mgedmin> .pth files are documented in https://docs.python.org/3.7/library/site.html
[15:12:18] <mgedmin> I don't remember if pip install -e runs actually python setup.py develop or if it does the equivalent all by itself
[15:12:31] <mgedmin> but yeah, editable installs == wrapper scripts + one pth file
[15:15:33] <mrquincy> Got it.
[15:20:25] <mrquincy> So it doesn't actually install "the business", it just links to the install dir passed to pip with the -e option
[15:20:28] <mgedmin> https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs links to the setuptools docs
[15:20:43] <mgedmin> yeah, the whole point of an editable install is to avoid making a copy of the source
[15:20:58] <mgedmin> so you can edit and run the new code immediately without an intermediate reinstall/update step
[15:22:20] <mrquincy> Gotcha. I was getting nervous because I was changing code and installing, but nothing would happen. Makes sense now.
[15:26:51] <mgedmin> (there's one exception: if you change the version number in your setup.py, editable installs might break and you'll need to repeat the pip install -e)
[16:30:11] <mrquincy> cool! I made a branch of the project and I'm happy with the result. Submitted a PR, but I want to make this thing available to users immediately.
[16:31:11] <mrquincy> I know I've used 'pip install thing==version' before. Is it possible to submit my own version tag to Pypi, or do I need to submit a totally new package with a different name
[16:32:05] <mgedmin> users can pip install from git repositories
[16:32:28] <mgedmin> https://stackoverflow.com/a/20101940
[16:35:12] <ngoldbaum> you can tell people to git install from your branch on your repo
[16:35:17] <ngoldbaum> err, pip install
[16:37:43] <mrquincy> Perfect. thanks
[16:39:26] <mrquincy> I assume I could replace branch with commit id as well? This branch could be a moving target
[17:10:03] <ngoldbaum> yes
[18:24:49] <mrquincy> ngoldbaum: Thanks, I'm most of the way there. However, the setup.py file isn't in the git repo root, it's in a subdirectory. Is there a way I can force it to check the subdir?