{"action":"created","issue":{"url":"https://api.github.com/repos/objectified/vdist/issues/5","labels_url":"https://api.github.com/repos/objectified/vdist/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/objectified/vdist/issues/5/comments","events_url":"https://api.github.com/repos/objectified/vdist/issues/5/events","html_url":"https://github.com/objectified/vdist/issues/5","id":124224974,"number":5,"title":"I don't get how vdist works when run against a project with setup.py","user":{"login":"dante-signal31","id":11260761,"avatar_url":"https://avatars.githubusercontent.com/u/11260761?v=3","gravatar_id":"","url":"https://api.github.com/users/dante-signal31","html_url":"https://github.com/dante-signal31","followers_url":"https://api.github.com/users/dante-signal31/followers","following_url":"https://api.github.com/users/dante-signal31/following{/other_user}","gists_url":"https://api.github.com/users/dante-signal31/gists{/gist_id}","starred_url":"https://api.github.com/users/dante-signal31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dante-signal31/subscriptions","organizations_url":"https://api.github.com/users/dante-signal31/orgs","repos_url":"https://api.github.com/users/dante-signal31/repos","events_url":"https://api.github.com/users/dante-signal31/events{/privacy}","received_events_url":"https://api.github.com/users/dante-signal31/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-29T15:23:16Z","updated_at":"2016-01-05T15:53:27Z","closed_at":"2016-01-05T15:53:27Z","body":"I'm trying to package [geolocate](https://github.com/dante-signal31/geolocate), but I haven't got an useful deployment package because of what I'm going to describe you.\r\n\r\nMy [vdist](https://github.com/objectified/vdist/) script is like this:\r\n```python\r\n \r\nfrom vdist.builder import Builder\r\nfrom vdist.source import git\r\n\r\nbuilder = Builder()\r\n\r\nbuilder.add_build(\r\n    app='geolocate',\r\n    version='1.3.0',\r\n    source=git(\r\n        uri='https://github.com/dante-signal31/geolocate',\r\n        branch='master'\r\n    ),\r\n    profile='ubuntu-trusty',\r\n    compile_python=True,\r\n    compile_python_version='3.4.3',\r\n    fpm_args='--maintainer dante.signal31@gmail.com -a native --url https://github.com/dante-signal31/geolocate --description \"This program accepts any text and searchs inside every IP address. With each of those IP addresses, geolocate queries Maxmind GeoIP database to look for the city and country where IP address or URL is located. Geolocate is designed to be used in console with pipes and redirections along with applications like traceroute, nslookup, etc. \" --license BSD-3 --category net',\r\n    requirements_path='/REQUIREMENTS.txt'\r\n)\r\n\r\nbuilder.build()\r\n```\r\n\r\nAs far as I've found out, vdist does next steps:\r\n\r\n1. Launch a Docker container.\r\n2. Updates that container OS packages.\r\n3. Installs [fpm](https://github.com/jordansissel/fpm).\r\n4. Downloads, compiles and install a Python interpreter with given version.\r\n5. Creates (if it doesn't exist yet) an /opt folder.\r\n6. Clones given git repository inside /opt folder.\r\n7. Creates a virtualenv with compiled Python inside /opt project folder.\r\n8. Activates virtualenv.\r\n9. Installs with pip all Python Package Index dependencies inside virtualenv.\r\n10. If project has a setup.py then runs it to install project inside virtualenv.\r\n11. Packages with fpm project folder and compiled python folder.\r\n12. Leaves compiled package in container shared folder.\r\n13. Shutdowns docker container.\r\n\r\nOK, I understand the overall process but I don't get steps 10 and 11 (mainly 11):\r\n\r\n* If you have run *\"python setup.py install\"*, project folder becomes useless because runnable application is actually installed in your virtualenv's *lib/python/site-packages*. As vdist seems to work, you end with your *setup.py* and *requirements.txt* being included in your deployment package, which are something I think you surely don't want in your debian package.\r\n* If vdist packages your compiled python folder but doesn't include anyhow your virtualenv's *site-packages* folder, pip downloaded dependencies shouldn't be lost?. \r\n* Vdist seems to focus on packaging project folder (that I said I think is mainly useless after setup's install) but doesn't seems to take in count virtualenv *site-packages* folder generated by setup install (which in my humble opinion is what you'd likely want to deploy). Actually, my *setup.py* generates too a geolocate launcher that is placed in virtualenv *bin* folder. I don't know how to include that launcher in generated package. \r\n* Suppose you end with a debian package that installs two folder: your application and the python virtualenv folder needed to run your application. How do you automate the installed virtualenv activation when your application launcher is called?.\r\n \r\nThanks for your time!"},"comment":{"url":"https://api.github.com/repos/objectified/vdist/issues/comments/169041963","html_url":"https://github.com/objectified/vdist/issues/5#issuecomment-169041963","issue_url":"https://api.github.com/repos/objectified/vdist/issues/5","id":169041963,"user":{"login":"dante-signal31","id":11260761,"avatar_url":"https://avatars.githubusercontent.com/u/11260761?v=3","gravatar_id":"","url":"https://api.github.com/users/dante-signal31","html_url":"https://github.com/dante-signal31","followers_url":"https://api.github.com/users/dante-signal31/followers","following_url":"https://api.github.com/users/dante-signal31/following{/other_user}","gists_url":"https://api.github.com/users/dante-signal31/gists{/gist_id}","starred_url":"https://api.github.com/users/dante-signal31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dante-signal31/subscriptions","organizations_url":"https://api.github.com/users/dante-signal31/orgs","repos_url":"https://api.github.com/users/dante-signal31/repos","events_url":"https://api.github.com/users/dante-signal31/events{/privacy}","received_events_url":"https://api.github.com/users/dante-signal31/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T15:53:27Z","updated_at":"2016-01-05T15:53:27Z","body":"As I've created a PR to solve topic discussed in this issue, I'm closing this issue assuming new info will be included in PR comments."}}