{ "info": { "author": "sganis", "author_email": "sganis@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Build Tools" ], "description": ".. _pypi.python.org: http://pypi.python.org\n.. _pip: https://pip.pypa.io\n.. _bandersnatch: https://pypi.python.org/pypi/bandersnatch\n.. _basket: https://pypi.python.org/pypi/Basket\n.. _pypi.python.org/pypi/minirepo: https://pypi.python.org/pypi/minirepo\n.. _github: https://github.com/sganis/minirepo\n\n********\nMinirepo\n********\n\nCreate a local pypi repository to use pip off-line.\n\n.. contents:: \n\nMinirepo is a command-line program that downloads Python packages from pypi.python.org_, so you can use pip_ without internet. I needed to maintain a python repository in an isolated cluster environment, and after trying several tools to mirror pypi index, I dedided to make my own tool. \n\nSome mirroring tools such us bandersnatch_ didn't meet my requirements, because I wanted to do a selective mirror, only downlowing all sources for python 2.7, for example. Bandersnatch gets the full content, about 140GB at the time of my first version of minirepo.\n\nThen I was inspired by basket_, which is almost what I wanted, but you need to specify the list of packages to download. I ended up using the json API to get the packages that I needed, and then calling basket to download or update the packages. In the end, that approach was slow and buggy, so I wrote this small program to do what I just needed. Now, my minirepo folder has about 12GB with only the latest packages, and it takes about 20 minutes to mirror.\n\n\nInstallation\n============\n\nUse pip\n-------\n\nThe easiest way to install it is to use pip:\n\n.. code:: bash\n\n $ pip install minirepo\n\nOr download and install\n-----------------------\n\nDownload the package file from https://pypi.python.org/pypi/minirepo, or the latest development version from https://github.com/sganis/minirepo, then:\n\n.. code:: bash\n\n $ tar xvzf minirepo-1.0.3.tar.gz\n $ cd minirepo-1.0.3\n $ python setup.py install\n\nYou can also use git:\n\n.. code:: bash\n\n $ git clone https://github.com/sganis/minirepo.git\n $ cd minirepo\n $ python setup.py install\n\n\nUsage\n=====\n\n.. code::\n\t\n\t# run it from the command line:\n\t$ minirepo\n\n\t# or run the python script if you didn't install it:\n\t$ ./minirepo.py\n\nThe firt time it's executed, the program will ask you for the local repository path, which defaults to ~/minirepo in Linux. A json configuration file is created and saved as ~/.minirepo, that you can edit to your preferences. This configuration file looks like this:\n\n.. code:: javascript\n\n\t{\n\t\t\"processes\" : 20, \n\t\t\"repository\" : \"/home/user/minirepo\"\n\t\t\"package_types\" : [\"bdist_egg\",\"bdist_wheel\",\"sdist\"], \n\t\t\"extensions\" : [\"bz2\",\"egg\",\"gz\",\"tgz\",\"whl\",\"zip\"], \n\t\t\"python_versions\" : [\"2.7\",\"any\",\"cp27\",\"py2\",\"py27\",\"source\"], \n\t}\n\n\nMinirepo uses packages_types, extensions, and python_versions as filters. I was analysing the full list of packages available in pypi.python.org_, and it looks that all the options are something like the list below, you can try any other option. For me, I was only interested in python 2.7 packages, sources, wheels and eegs distributions, and some extensions.\n\n.. code:: python\n\n\tPYTHON_VERSIONS = [\n\t\t'2', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '2.7.6', '3.0', '3.1', \n\t\t'3.2', '3.3', '3.4', '3.5', 'any', 'cp25', 'cp26', 'cp27', 'cp31', \n\t\t'cp32', 'cp33', 'cp34', 'cp35', 'py2', 'py2.py3', 'py26', 'py27', \n\t\t'py3', 'py32, py33, py34', 'py33', 'py34', 'python', 'source'\n\t]\n\t\n\tPACKAGE_TYPES = [\n\t\t'bdist_dmg', 'bdist_dumb', 'bdist_egg', 'bdist_msi', 'bdist_rpm', \n\t\t'bdist_wheel', 'bdist_wininst', 'sdist'\n\t]\n\t\n\tEXTENSIONS = [\n\t\t'bz2', 'deb', 'dmg', 'egg', 'exe', 'gz', 'msi', 'rpm', 'tgz', 'whl', 'zip'\n\t]\n\n\nUse pip without internet\n========================\n\n.. code:: bash\n\n\t$ pip install --no-index --find-links=/home/user/minirepo \n\n\nI prefer to setup environment variables in my profile so I don't have to provide extra command line arguments.\n\n.. code:: bash\n\n\t# save these 2 variable in your profile \n\t$ export PIP_NO_INDEX=true\n\t$ export PIP_FIND_LINKS=/home/user/minirepo\n\t\n\t# then run pip as usual\n\t$ pip install ", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sganis/minirepo", "keywords": "minirepo development pip mirror packages offline repository", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "minirepo", "package_url": "https://pypi.org/project/minirepo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/minirepo/", "project_urls": { "Homepage": "https://github.com/sganis/minirepo" }, "release_url": "https://pypi.org/project/minirepo/1.0.3/", "requires_dist": null, "requires_python": null, "summary": "Create a local pypi repository to use pip off-line", "version": "1.0.3" }, "last_serial": 1540930, "releases": { "1.0.2": [ { "comment_text": "", "digests": { "md5": "49ad3636f10fcf6657472f42367d5f06", "sha256": "ee8a47d8ef075be59ba671f6c7083b644e5a9364d836117649f3cff311b2312e" }, "downloads": -1, "filename": "minirepo-1.0.2.tar.gz", "has_sig": false, "md5_digest": "49ad3636f10fcf6657472f42367d5f06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6165, "upload_time": "2015-05-09T05:17:09", "url": "https://files.pythonhosted.org/packages/5d/fc/77695d3c861f7f51ded636f1e9552d01ac67d6eedee00af25ec7854ee7e4/minirepo-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "70803819736c8c2102e1e3d2b1db91b3", "sha256": "e695dae5c37ca92847d629e187ed8351bcb4360f4429ca0b0690dd6fb18d1664" }, "downloads": -1, "filename": "minirepo-1.0.3.tar.gz", "has_sig": false, "md5_digest": "70803819736c8c2102e1e3d2b1db91b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7020, "upload_time": "2015-05-10T14:58:48", "url": "https://files.pythonhosted.org/packages/12/3b/99710fa8aa8cff42cd39cb7160fcdec4b94b9894c08e90871be871d310bc/minirepo-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "70803819736c8c2102e1e3d2b1db91b3", "sha256": "e695dae5c37ca92847d629e187ed8351bcb4360f4429ca0b0690dd6fb18d1664" }, "downloads": -1, "filename": "minirepo-1.0.3.tar.gz", "has_sig": false, "md5_digest": "70803819736c8c2102e1e3d2b1db91b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7020, "upload_time": "2015-05-10T14:58:48", "url": "https://files.pythonhosted.org/packages/12/3b/99710fa8aa8cff42cd39cb7160fcdec4b94b9894c08e90871be871d310bc/minirepo-1.0.3.tar.gz" } ] }