[13:38:44] <Denommus> I'm trying to create a debian package by packaging a whole virtualenv with my application
[13:39:17] <Denommus> but I'm having trouble with some packages
[13:39:27] <Siecje> Denommus: Have you seen https://github.com/nylas/make-deb ?
[13:39:47] <Denommus> Siecje: I have, but it's a legacy package, I'm trying to improve upon it
[13:40:29] <xafer> You might also want to check https://github.com/spotify/dh-virtualenv
[13:42:53] <Denommus> I'm almost rewriting the package to benefit from one of those
[13:43:27] <Denommus> but I just wanted to know why PIP_CONFIG_FILE=/dev/null pip3 install -r requirements.txt --root=debian/my-project/usr/lib/auctions-env/ --isolated --ignore-installed fails
[13:43:52] <Denommus> is there anything wrong with this oneliner? Shouldn't it do what I expect it to do?
[13:44:03] <Denommus> pip is not running under a virtualenv, tbh, but should it?
[13:58:51] <Siecje> Denommus: Are you just creating a virtualenv installing your dependencies, putting virtualenv with your code and then adding a binary that runs /path/to/venv/bin/python /path/to/source/main.py ?
[13:59:04] <Siecje> When are you running that command during the build? or after install?
[13:59:14] <Denommus> I'm creating a virtualenv, and then trying to install things under it using pip
[13:59:35] <Denommus> but not the pip that is inside this virtualenv
[14:01:02] <Denommus> ok, I changed a lot the command
[14:01:12] <Denommus> now I'm having an error with defusedxml -.-
[14:01:41] <Siecje> You should use the pip inside the virtualenv
[14:01:48] <Denommus> FileNotFoundError: [Errno 2] File or directory not found: 'usr/lib/my-env/lib/python3.5/site-packages/defusedxml-0.4.1-py3.5.egg-info/installed-files.txt'
[14:20:14] <Siecje> Denommus: Create the virtualenv where you want and don't use --root?
[14:25:27] <Denommus> Siecje: but the virtualenv is being used in a packaging process, scripts are referencing to the virtualenv's path when I don't specify root
[14:25:59] <Denommus> Siecje: is there a way to create a virtualenv in a path and "pretend" it exists in another path?
[14:26:20] <Denommus> Siecje: because that's what --root should be doing with the packages, right?
[14:26:31] <Siecje> Can't you just create it in the "pretend" path ?
[14:27:46] <Denommus> Siecje: the "pretend" path is the system's root
[14:27:52] <Siecje> So you want it to be installed in /usr/lib/project-name/ ? Why not make that directory a venv and then install everything and then package that directory?
[14:28:34] <Denommus> because the debian package process requires the structure to be under debian/my-project/
[14:29:06] <Denommus> and I can't simply simlink the machine's root to it :P
[14:29:54] <Siecje> Denommus: What do you mean by debian/ ? that is not a full path
[14:30:30] <Siecje> create debian/usr/lib/ then python3.5 -m venv debian/usr/lib/project-name
[14:30:55] <Denommus> yes, I am creating a virtualenv under that place
[14:36:54] <Siecje> You said a debian package must start with debian/ so if you want to add a file to /usr/lib/ you would have to put it in debian/usr/lib/
[14:37:11] <Denommus> it must start with debian/my-project
[14:38:11] <Denommus> Siecje: yup, until that point it works
[14:38:19] <Denommus> Siecje: if I try to just install packages, it also works
[14:39:21] <Denommus> Siecje: BUT django-admin.py will use #!/home/my-user/my-project-path/debian/my-project/usr/lib/my-env/bin/python instead of #!/usr/lib/my-env/bin/python
[14:39:44] <Denommus> Siecje: that's why I need to set root, and that's why I need the virtualenv to be relocatable
[14:40:03] <Denommus> Siecje: was I clearer now? Do I need to provide better explanation?
[14:40:55] <Siecje> I understand now. I have seen that problem. For me part of the build process changes those lines.
[14:41:35] <Denommus> Siecje: so is your suggestion to just use sed?
[14:41:37] <Siecje> You could manually change them depending how many there are