{ "info": { "author": "Eric Dill", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# conda-mirror-ng\n\n[![Build Status](https://travis-ci.com/xhochy/conda-mirror-ng.svg?branch=master)](https://travis-ci.com/xhochy/conda-mirror-ng)\n\n\n\nMirrors an upstream conda channel to a local directory.\n\n## Install\n\n`conda-mirror-ng` is available on PyPI and conda-forge.\n\nInstall with:\n\n`pip install conda-mirror-ng`\n\nor:\n\n`conda install conda-mirror-ng -c conda-forge`\n\n## Compatibility\n\n`conda-mirror-ng` is intentionally a Py3.6+ only package\n\n## CLI\n\nCLI interface for `conda-mirror-ng`\n\n```\nusage: conda-mirror-ng [-h] [--upstream-channel UPSTREAM_CHANNEL]\n [--target-directory TARGET_DIRECTORY]\n [--temp-directory TEMP_DIRECTORY] [--platform PLATFORM]\n [-v] [--config CONFIG] [--pdb] [--num-threads NUM_THREADS]\n [--version] [--dry-run] [--no-validate-target]\n [--minimum-free-space MINIMUM_FREE_SPACE]\n\nCLI interface for conda-mirror-ng\n\noptional arguments:\n -h, --help show this help message and exit\n --upstream-channel UPSTREAM_CHANNEL\n The target channel to mirror. Can be a channel on\n anaconda.org like \"conda-forge\" or a full qualified\n channel like \"https://repo.continuum.io/pkgs/free/\"\n --target-directory TARGET_DIRECTORY\n The place where packages should be mirrored to\n --temp-directory TEMP_DIRECTORY\n Temporary download location for the packages. Defaults\n to a randomly selected temporary directory. Note that\n you might need to specify a different location if your\n default temp directory has less available space than\n your mirroring target\n --platform PLATFORM The OS platform(s) to mirror. one of: {'linux-64',\n 'linux-32','osx-64', 'win-32', 'win-64'}\n -v, --verbose logging defaults to error/exception only. Takes up to\n three '-v' flags. '-v': warning. '-vv': info. '-vvv':\n debug.\n --config CONFIG Path to the yaml config file\n --pdb Enable PDB debugging on exception\n --num-threads NUM_THREADS\n Num of threads for validation. 1: Serial mode. 0: All\n available.\n --version Print version and quit\n --dry-run Show what will be downloaded and what will be removed.\n Will not validate existing packages\n --no-validate-target Skip validation of files already present in target-\n directory\n --minimum-free-space MINIMUM_FREE_SPACE\n Threshold for free diskspace. Given in megabytes.\n```\n\n## Example Usage\n\nWARNING: Invoking this command will pull ~10GB and take at least an hour\n\n`conda-mirror-ng --upstream-channel conda-forge --target-directory local_mirror --platform linux-64`\n\n## More Details\n\n### blacklist/whitelist configuration\n\nexample-conf.yaml:\n\n```yaml\nblacklist:\n - license: \"*agpl*\"\n - license: None\n - license: \"\"\n\nwhitelist:\n - name: system\n```\n\n`blacklist` removes package(s) that match the condition(s) listed from the\nupstream repodata.\n\n`whitelist` re-includes any package(s) from blacklist that match the\nwhitelist conditions.\n\nblacklist and whitelist both take lists of dictionaries. The keys in the\ndictionary need to be values in the `repodata.json` metadata. The values are\n(unix) globs to match on. Go here for the full repodata of the upstream\n\"defaults\" channel:\nhttp://conda.anaconda.org/anaconda/linux-64/repodata.json\n\nHere are the contents of one of the entries in repodata['packages']\n\n```python\n{'botocore-1.4.10-py34_0.tar.bz2': {'arch': 'x86_64',\n 'binstar': {'channel': 'main',\n 'owner_id': '55fc8527d3234d09d4951c71',\n 'package_id': '56b88ea1be1cc95a362b218e'},\n 'build': 'py34_0',\n 'build_number': 0,\n 'date': '2016-04-11',\n 'depends': ['docutils >=0.10',\n 'jmespath >=0.7.1,<1.0.0',\n 'python 3.4*',\n 'python-dateutil >=2.1,<3.0.0'],\n 'license': 'Apache',\n 'md5': 'b35a5c1240ba672e0d9d1296141e383c',\n 'name': 'botocore',\n 'platform': 'linux',\n 'requires': [],\n 'size': 1831799,\n 'version': '1.4.10'}}\n```\n\nSee implementation details in the `conda_mirror:match` function for more\ninformation.\n\n#### Common usage patterns\n##### Mirror **only** one specific package\nIf you wanted to match exactly the botocore package listed above with your\nconfig, then you could use the following configuration to first blacklist\n**all** packages and then include just the botocore packages:\n\n```yaml\nblacklist:\n - name: \"*\"\nwhitelist:\n - name: botocore\n version: 1.4.10\n build: py34_0\n```\n##### Mirror everything but agpl licenses\n```yaml\nblacklist:\n - license: \"*agpl*\"\n```\n\n##### Mirror only python 3 packages\n```yaml\nblacklist:\n - name: \"*\"\nwhitelist:\n - build: \"*py3*\"\n```\n\n## Testing\n\n### Install test requirements\n\nNote: Will install packages from pip\n\n```\n$ pip install -r test-requirements.txt\nRequirement already satisfied: pytest in /home/edill/miniconda/lib/python3.5/site-packages (from -r test-requirements.txt (line 1))\nRequirement already satisfied: coverage in /home/edill/miniconda/lib/python3.5/site-packages (from -r test-requirements.txt (line 2))\nRequirement already satisfied: pytest-ordering in /home/edill/miniconda/lib/python3.5/site-packages (from -r test-requirements.txt (line 3))\nRequirement already satisfied: py>=1.4.29 in /home/edill/miniconda/lib/python3.5/site-packages (from pytest->-r test-requirements.txt (line 1))\n```\n\n### Run the tests, invoking with the `coverage` tool.\n\n```\n$ coverage run run_tests.py\nsys.argv=['run_tests.py']\n========================================= test session starts ==========================================\nplatform linux -- Python 3.5.3, pytest-3.0.6, py-1.4.31, pluggy-0.4.0 -- /home/edill/miniconda/bin/python\ncachedir: .cache\nrootdir: /home/edill/dev/maxpoint/github/conda-mirror, inifile:\nplugins: xonsh-0.5.2, ordering-0.4\ncollected 4 items\n\ntest/test_conda_mirror.py::test_match PASSED\ntest/test_conda_mirror.py::test_cli[https://repo.continuum.io/pkgs/free-linux-64] PASSED\ntest/test_conda_mirror.py::test_cli[conda-forge-linux-64] PASSED\ntest/test_conda_mirror.py::test_handling_bad_package PASSED\n\n======================================= 4 passed in 4.41 seconds =======================================\n```\n\n## Releasing\n\nTo release you need three things\n\n1. Commit rights to conda-mirror-ng\n2. Access to `conda-mirror-ng` on PyPI\n3. Access to `conda-mirror-ng-feedstock` on conda-forge\n\nAfter you have all three of these things, add a git tag, upload an sdist using\n`twine` and merge the automatically generated PR on conda-forge.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/xhochy/conda-mirror-ng", "keywords": "", "license": "BSD 3-Clause", "maintainer": "", "maintainer_email": "", "name": "conda-mirror-ng", "package_url": "https://pypi.org/project/conda-mirror-ng/", "platform": "Linux", "project_url": "https://pypi.org/project/conda-mirror-ng/", "project_urls": { "Homepage": "https://github.com/xhochy/conda-mirror-ng" }, "release_url": "https://pypi.org/project/conda-mirror-ng/0.8.1/", "requires_dist": null, "requires_python": "", "summary": "Mirror an upstream conda channel to a local directory", "version": "0.8.1", "yanked": false, "yanked_reason": null }, "last_serial": 6013709, "releases": { "0.8.1": [ { "comment_text": "", "digests": { "md5": "55ab8fceb2a922513e0f6b373005e63d", "sha256": "d1dd2aaca6f28f95a397414d3ec82ce971f70be5095b228c21586b62a3bdc85a" }, "downloads": -1, "filename": "conda_mirror_ng-0.8.1.tar.gz", "has_sig": false, "md5_digest": "55ab8fceb2a922513e0f6b373005e63d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21018, "upload_time": "2019-10-22T15:55:03", "upload_time_iso_8601": "2019-10-22T15:55:03.966756Z", "url": "https://files.pythonhosted.org/packages/30/ae/8b3ac27096060f4b82bbae3981bfa89368689962ce4a3b8b912ebfd21dbe/conda_mirror_ng-0.8.1.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "55ab8fceb2a922513e0f6b373005e63d", "sha256": "d1dd2aaca6f28f95a397414d3ec82ce971f70be5095b228c21586b62a3bdc85a" }, "downloads": -1, "filename": "conda_mirror_ng-0.8.1.tar.gz", "has_sig": false, "md5_digest": "55ab8fceb2a922513e0f6b373005e63d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21018, "upload_time": "2019-10-22T15:55:03", "upload_time_iso_8601": "2019-10-22T15:55:03.966756Z", "url": "https://files.pythonhosted.org/packages/30/ae/8b3ac27096060f4b82bbae3981bfa89368689962ce4a3b8b912ebfd21dbe/conda_mirror_ng-0.8.1.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }