PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Monday the 9th of March, 2020

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[14:50:49] <gp> How can I write a constraints file that specifies the package to be installed from source or a git url?
[14:51:42] <gp> I am trying to use a global constraint file for a multi app project but am hitting a problem where I can't install the package from the source with .
[14:51:54] <tos9> gp: that sounds a bit odd
[14:52:09] <tos9> gp: constraints files are for specifying constraints for distributions, they don't have much to do with where a distribution comes from
[14:52:17] <gp> I will post a paste. Maybe I am doing it wrong
[14:52:20] <tos9> gp: your requirements file would contain that
[14:52:56] <gp> tos9: here is my requirements file https://dpaste.org/vVfA
[14:55:07] <gp> tos9: then my contraints looks something like: https://dpaste.org/R8iJ
[14:55:30] <gp> it works fine from the integration app obviously. But the individual apps cannot install themselves for testing with tox via pip
[14:56:10] <gp> I get an error like: ERROR: Could not satisfy constraints for 'app1': installation from path or url cannot be constrained to a version
[14:56:40] <gp> Is it possible to have the constraint file allow the git package or locally installed versions?
[15:00:55] <gp> Perhaps the best course of action is to remove . from the requirements file and install that with a separate command?
[15:02:58] <tos9> gp: yeah what are you trying to implement behavior-wise with this? you want to make sure that anythign that depends on app1 and app2 uses the latest commit on master of their git repos?
[15:03:08] <gp> tos9: yes
[15:03:17] <gp> tos9: and it doesn't pull from pypi. just the git branch
[15:03:33] <gp> tos9: so my requirement files can list the package name without speicfying the git repo address
[15:04:54] <tos9> I've not seen or thought of using constraints files in that way, it's a bit dirty feeling to have the thing in a constraints file be a moving thing
[15:05:08] <tos9> which is likely why the error message is there and telling you it doesn't want to do so
[15:05:35] <tos9> constraints files are really for moving away from particular fixed versions
[15:06:12] <gp> tos9: ah. Figured it would be a handy way to install project specific versions globally with one config file
[15:06:38] <tos9> gp: I think if you really want to do that (remove some duplication of the git URL), maybe you should try actually using a regular requirements file?
[15:07:02] <tos9> like have a requirements file instead with that git URL, and then anything that wants to depend on app1 includes its requirements file and then doesn't need to know about the URL?
[15:07:47] <gp> tos9: I started there. It was really difficult to understand with like 15 git repos. you have to scroll the file to the end and read the egg name
[15:08:15] <gp> tos9: thanks. I will play around with it and try to get something in the middle of convenient and "right" :)
[15:08:43] <tos9> gp: yeah dunno what to suggest -- I assume somewhere around here you're also trying to solve private packaging things
[15:08:49] <tos9> I think this is still a big hole in the tools at the minute
[15:08:58] <tos9> gp: I will say I think personally installing out of git repos is an antipattern
[15:09:13] <gp> tos9: yea but I don't have a better way at the moment
[15:09:14] <tos9> and that bad as it is, you should possibly be thinking about at least setting up a simple index, and having all your git repos push to it (via your CI)
[15:09:33] <gp> tos9: one day =)
[15:09:40] <tos9> if you want to do CD then (and have everything always use master), all fine, and you just have every commit getting pushed
[15:09:56] <tos9> gp: good luck, lemme know what you come up with
[15:10:26] <toad_polo> devpi is a very good choice for a private PyPI.
[15:11:09] <tos9> it's the best I know of too (though I've got a long list of complaints with it)
[15:11:12] <gp> Using gitlab now. Supposedly a private pip repo is in the works. So hopefully not too far out and this will all be moot
[15:11:17] <tos9> but can certainly say "you can use it successfully" about it
[15:12:20] <tos9> gp: (just to be sure -- you're aware that a "simple index" requires no infra right? you just have an s3 bucket or some other HTTP place serving dists and pip can use that just fine with no special added thing)
[15:12:36] <tos9> there are disadvantages, and you likely won't last on one, but yeah, just making sure you're aware of that at least
[15:12:44] <techalchemy> to host private pypi? yeah it all depends on how you want to manage it
[15:13:08] <techalchemy> if you want any kind of 'serious' permissions integrations for audit reasons at your company you will need to pay someone
[15:13:19] <techalchemy> like artifactory or the other big provider i forget the name of
[15:14:14] <dude-x> nexus iq
[15:15:46] <gp> actually removing . from requirements and then installing the local package in a pre command with tox makes that pretty straightforward. Might work for now as-is
[15:15:51] <gp> https://dpaste.org/Y4wJ
[15:28:51] <graingert> so I'm currently using (abusing?) sitecustomize.py to make two virtualenvs inherit from each other
[15:29:04] <graingert> by calling site.addsitedir("path/to/other/virtualenv")
[15:29:10] <graingert> in sitepackages.py
[15:29:20] <graingert> it looks like that's not run here https://github.com/pypa/virtualenv/issues/1703
[15:30:25] <graingert> my (ab)use case is to install a load of deps into virtualenv A and then install a small number of otherwise incompatible deps into virtualenv B and virtualenv C
[15:30:40] <graingert> and have them both inherit from virtualenv A
[15:30:42] <gp> btw - if anyone is interested. here is the tracker for gitlab adding a pypi repository
[15:30:43] <gp> https://gitlab.com/gitlab-org/gitlab/issues/10483
[15:30:44] <graingert> also on python2
[15:31:43] <gp> sorry this is the primary link: https://gitlab.com/groups/gitlab-org/-/epics/2554
[18:05:06] <AndyAndyBoBandy> I'm having a confusion with pip, venv, and 'python -m pip', and I don't know if it's a bug or misunderstanding. I'm inside a python project folder (pip-tools), and I activate a venv (located outside the folder). `which` confirms both `pip` (20.0.2) and `python` (3.8.2) are from the venv. If I `python -m pip install pip-tools` it does not install, claiming req already satisfied (in current dir). This seems completely wrong to me. If I `pip install
[18:05:07] <AndyAndyBoBandy> pip-tools`, it installs properly.
[18:09:17] <AndyAndyBoBandy> hmm, trying to distill a good reproduction, will report back
[18:14:30] <AndyAndyBoBandy> alright, this reproduces: http://ix.io/2dPi
[18:28:01] <AndyAndyBoBandy> and the problem is the same without '-e' as well.
[18:34:40] <gp> heh so my fix wasn't so simple. I tested on a project without dependencies =P
[18:44:33] <gp> Is there any way to use pip install . and only install dependencies? Like --no-deps but --only-deps?
[18:56:50] <ngoldbaum> @AndyAndyBoBandy does "python" come from the venv?
[19:00:37] <AndyAndyBoBandy> yes, as stated
[19:02:01] <AndyAndyBoBandy> ngoldbaum: do those reproduction steps not repro for you? I guess I should add a `pip install -U pip` line to ensure consistency (that repros here as well)
[19:02:36] <AndyAndyBoBandy> http://ix.io/2dPx
[19:02:59] <ngoldbaum> i didn't try running them
[19:03:14] <ngoldbaum> i'm not a pypa member or developer, just a guy in this channel
[19:03:29] <ngoldbaum> ah yeah, i missed that python was from the venv, sorry
[19:03:40] <ngoldbaum> i thought you said that just pip was but didn't happen to check python
[19:03:42] <ngoldbaum> sorry for the noise
[19:04:09] <ngoldbaum> given that you have steps to reproduce it might make more sense to report an issue against python (i think that's the correct place for venv issues?)
[19:07:47] <AndyAndyBoBandy> Not sure yet if it's a venv issue, seems probably a pip issue, since it works correctly with called as 'pip' and incorrectly as 'python -m pip'. Also haven't totally confirmed it's not already known somehow. BTW I also repro with `pip install -U 'pip @ git+https://github.com/pypa/pip'` instead of latest release.
[19:08:09] <ngoldbaum> ok, then git issue tracker
[19:08:28] <ngoldbaum> chat is just a kinda crappy medium for bug reports
[19:08:30] <ngoldbaum> s/git/github/
[19:09:35] <AndyAndyBoBandy> Yes, I will if it's not a known issue. I'm not trying to use this as an issue tracker. I'm trying to understand the problem as best I can at this stage so I don't make a half-assed report and cause noise there.
[19:12:39] <ngoldbaum> i mean, if you can't find an issue searching it's not making noise, but maybe one of the pip maintainers has a better idea
[19:12:50] <AndyAndyBoBandy> huh, I'm surprised --no-build-isolation is becoming default as of c08d4cc806897de687785c723ac7b767c1bc2711
[19:14:45] <AndyAndyBoBandy> pradyunsg: was that truly intended?
[19:25:22] <AndyAndyBoBandy> ngoldbaum: if you're curious, I'm currently trying to determine if my issue is the same as 4 year old #3710
[19:35:22] <pradyunsg> AndyAndyBoBandy: no?
[19:35:41] <pradyunsg> AndyAndyBoBandy: have a link handy?
[19:37:48] <AndyAndyBoBandy> pradyunsg: https://github.com/pypa/pip/commit/c08d4cc806897de687785c723ac7b767c1bc2711
[19:38:01] <AndyAndyBoBandy> Line 459
[19:40:35] <AndyAndyBoBandy> I was testing for my current issue with master, and noticed all the "Could not build wheels for <pkg>,since package 'wheel' is not installed." messages, which led me to that, which looks like the new inverted option defaults to true
[21:00:22] <pradyunsg> AndyAndyBoBandy: ah! We're bad at naming / setting values for these options.
[21:01:29] <pradyunsg> AndyAndyBoBandy: you're likely attempting a wheel build, without the wheel package installed, hence the error message.
[21:02:00] <AndyAndyBoBandy> pradyunsg: well yes, but with build isolation on, which is the default in the current release, wheel gets included automatically
[21:02:33] <AndyAndyBoBandy> as of that commit, NO-build-isolation is set True by default, inverting that
[21:02:40] <pradyunsg> build isolation is the default behaviour - we've just... not been great at setting the internal values very nicely / consistently.
[21:04:26] <pradyunsg> The naming+values are confusing, but changing them now can result in breakages for users... so... until we get better migration / deprecation strategies.
[21:04:34] <AndyAndyBoBandy> pradyunsg: in a fresh venv, `pip install pip-tools` fails in master, succeeds in release. Shouldn't wheel be included in master as well, if build isolation is indeed (still) the default?
[21:05:01] <pradyunsg> Overall, if you have a pyproject.toml file, you're opted into an isolated build. Otherwise, you're not.
[21:05:34] <AndyAndyBoBandy> oh, I thought build-isolation was on by default (default as in, if I don't specify a flag on the cli)
[21:05:58] <pradyunsg> *if there's a pyproject.toml in the package being installed.
[21:06:24] <AndyAndyBoBandy> you're saying if I don't specify on the cli, whether or not isolation is on will vary all the time depending on what packages are being dealt with? (!)
[21:07:41] <pradyunsg> Yes. The isolation is for build time - and, well, each package is built in isolation (or not) based on the presence of pyproject.toml.
[21:07:56] <pradyunsg> I don't think behaviour should've changed (re pip-tools), so please file a bug report?
[21:08:14] <AndyAndyBoBandy> as a very important note if that is indeed the case: pip install --help output **provides no instructions for _enabling_ build isolation**
[21:09:59] <pradyunsg> I'm heading to bed now - putting these down in a bug report would be useful for a not-sleepy-me and others to respond to. :)
[21:10:51] <AndyAndyBoBandy> yeah I gotta go pick up a tiny family member, I'll try to post one in ~7hrs