{ "info": { "author": "Blur Studio", "author_email": "pipeline@blur.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "# virtualenvconfig\r\n\r\nModifies pip for a virtualenv to prefer a custom abi tag. This is used to make it easy to install\r\ncompiled c++ packages like numpy and scipy that work for a given Digital Content Creation software\r\n(DCC) like Maya, 3ds Max, Nuke, Houdini, etc.\r\n\r\n## installing\r\n\r\nHere is a example of creating a virtualenv designed to install wheels compatible with DCC's compiled\r\nwith Visual Studio 2015. Create the virtual environment and activate it.\r\n\r\n```\r\n$ virtualenv msvc2015_64\r\n$ msvc2015_64\\Scripts\\activate\r\n(python) $ pip install virtualenvconfig\r\n```\r\n\r\n## Setting the abi\r\n\r\nYou can specify the abi(s) that pip will try to download before the normal wheels. In this example pip\r\nwill try to download wheels with a abi of `vc2015`. If no matching package is found, it will try to\r\ndownload wheels with a abi of `vc2010`. If no matching package is found, it will attempt to find a package\r\nas pip normally does. Make sure to call python so you use the virtualenv's python, not the system python.\r\n\r\n```\r\n(python) $ cd msvc2015_64\\lib\\site-packages\r\n(python) $ python virtualenvconfig.py --set-abi vc2015 --set-abi vc2010\r\n```\r\n\r\n## Activating\r\n\r\nUp to this point, we haven't actually updated pip's behavior. We need to monkey patch pip so it respects\r\nour custom abi settings. This is done by adding/updating sitecustomize.py. When python is being initialized\r\nit will attempt to import `sitecustomize`. Any errors in this file being imported are suppressed.\r\n\r\nThis command will create sitecustomize.py\r\n```\r\n(python) $ virtualenvconfig.py --install\r\n```\r\nIf sitecustomize.py already exists, you need to pass the `--overwrite` or `-o` argument\r\n\r\n```\r\n(python) $ python virtualenvconfig.py --install -o\r\n```\r\n\r\nThis creates sitecustomize.py in the lib folder not the site-packages folder. This makes it so\r\nthe sitecustomize python script is only run when activating the virtualenv, not if the site-packages\r\ndirectory is used without activating the virtualenv.\r\n\r\n# Building custom abi wheels\r\n\r\nNow that we can force pip to prefer a given set of abi's, we need to be able to build pip packages for\r\nthose custom abi's. This can be done by updating your pip package's setup.py file to use a the custom\r\n``bdist_wheel`` class ``abi_bdist_wheel``. This will add a required command line argument to setup.py\r\n``--abi [abi_name]`` allowing you to specify the abi used when building the wheel.\r\n\r\n**An example setup.py:**\r\n```py\r\nfrom setuptools import setup, find_packages\r\nimport virtualenvconfig\r\n\r\nsetup(\r\n\t...,\r\n\t# Force the build command to be passed the target abi as a command line argument\r\n\tcmdclass={'bdist_wheel': virtualenvconfig.abi_bdist_wheel()},\r\n)\r\n```\r\n\r\n# Virtualenv setup at Blur\r\n\r\nBlur creates a virtualenv for each required Microsoft Visual C++ compiled version required for\r\nthe DCC software's we need. For example to support Maya 2018/2019, 3ds Max 2018/19, houdini16.5/17\r\nwe create ``C:\\blur\\lib\\msvc2015_64_qt5\\{release}\\python`` as a python 2.7 virtualenv. We then\r\nactivate and pip install all the packages we want access to in python for these DCC's. This\r\nincludes numpy/scipy compiled for msvc2010, and our custom PyQt and database code compiled with\r\nmsvc2015 to be compatible with the DCC's. Then as part of our startup scripts we insert\r\n``C:\\blur\\lib\\msvc2015_64_qt5\\{release}\\python\\Lib\\site-packages`` at the start of ``sys.path``\r\nallowing the DCC to use the python modules installed there.\r\n\r\n\r\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/blurstudio/virtualenvconfig/archive/master.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/blurstudio/virtualenvconfig", "keywords": "", "license": "GNU LGPLv3", "maintainer": "", "maintainer_email": "", "name": "virtualenvconfig", "package_url": "https://pypi.org/project/virtualenvconfig/", "platform": "", "project_url": "https://pypi.org/project/virtualenvconfig/", "project_urls": { "Download": "https://github.com/blurstudio/virtualenvconfig/archive/master.zip", "Homepage": "https://github.com/blurstudio/virtualenvconfig" }, "release_url": "https://pypi.org/project/virtualenvconfig/0.0.6/", "requires_dist": [ "gorilla", "pip (>=19.1.1)" ], "requires_python": "", "summary": "Customize abi resolution for a given virtualenv setup.", "version": "0.0.6" }, "last_serial": 5575104, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "e093f070e35a79b069b5b2d4d5038813", "sha256": "3fde93be8259d7655cf93d51ca63ba2113a0708452bfd26ec148e0877e9aced1" }, "downloads": -1, "filename": "virtualenvconfig-0.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "e093f070e35a79b069b5b2d4d5038813", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7875, "upload_time": "2019-07-03T23:17:33", "url": "https://files.pythonhosted.org/packages/76/86/e0e3d978e9fbc5582c078651d20220f35ddc7287a3118464c709f4e746f7/virtualenvconfig-0.0.2-py2-none-any.whl" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "863be15251eee480e3305406fd3e0ef0", "sha256": "30968b3a023beb90175b3faaf8894a1fa67ab207cffd81f22ceea44c76130db6" }, "downloads": -1, "filename": "virtualenvconfig-0.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "863be15251eee480e3305406fd3e0ef0", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7916, "upload_time": "2019-07-04T01:08:18", "url": "https://files.pythonhosted.org/packages/dc/31/998fad27d20a266067736f37439a7b8e2cf6b3998154e3b2fcc4fbc77080/virtualenvconfig-0.0.3-py2-none-any.whl" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "6ca6cd9169ed2685a0d4786ccaec95d9", "sha256": "fe8d38ff48105940187ac40d41a91f6dc4a7d8632256a2c09e0a03681501c4c0" }, "downloads": -1, "filename": "virtualenvconfig-0.0.4-py2-none-any.whl", "has_sig": false, "md5_digest": "6ca6cd9169ed2685a0d4786ccaec95d9", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8677, "upload_time": "2019-07-04T01:46:54", "url": "https://files.pythonhosted.org/packages/f1/8e/0837b3254ee6b54c8550aeb6593d57dd819b26790b27b0828bdc7b2d7122/virtualenvconfig-0.0.4-py2-none-any.whl" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "4db9b0f519c2130475c2fcecc372d9c7", "sha256": "f7ea038f9f560939ecde2320f65d2d8249a45b7f54a2afe3e9bd8dde292b8638" }, "downloads": -1, "filename": "virtualenvconfig-0.0.6-py2-none-any.whl", "has_sig": false, "md5_digest": "4db9b0f519c2130475c2fcecc372d9c7", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8758, "upload_time": "2019-07-24T00:43:11", "url": "https://files.pythonhosted.org/packages/61/18/a99ffba71e569c846750ad4d989a3b4bc70bcd44e6d5eee97a75957c0981/virtualenvconfig-0.0.6-py2-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4db9b0f519c2130475c2fcecc372d9c7", "sha256": "f7ea038f9f560939ecde2320f65d2d8249a45b7f54a2afe3e9bd8dde292b8638" }, "downloads": -1, "filename": "virtualenvconfig-0.0.6-py2-none-any.whl", "has_sig": false, "md5_digest": "4db9b0f519c2130475c2fcecc372d9c7", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8758, "upload_time": "2019-07-24T00:43:11", "url": "https://files.pythonhosted.org/packages/61/18/a99ffba71e569c846750ad4d989a3b4bc70bcd44e6d5eee97a75957c0981/virtualenvconfig-0.0.6-py2-none-any.whl" } ] }