diff --git a/.CI/create_feedstocks b/.CI/create_feedstocks index 10d0c112b8a43..f704e2fef4cc7 100755 --- a/.CI/create_feedstocks +++ b/.CI/create_feedstocks @@ -9,8 +9,6 @@ if [ -n "$GH_TOKEN" ]; then conda config --set show_channel_urls true conda config --add channels conda-forge conda install --yes --quiet conda-smithy - # Temporary workaround b/c conda-build-all is not ready for the latest conda-build. - conda install -n root --yes --quiet conda-build=1.20.1 python .CI/create_feedstocks.py fi diff --git a/.CI/create_feedstocks.py b/.CI/create_feedstocks.py index 7df1dc4ffa951..417082472f81d 100755 --- a/.CI/create_feedstocks.py +++ b/.CI/create_feedstocks.py @@ -87,6 +87,30 @@ def create_team(org, name, description, repo_names): ) return Team.Team(org._requester, headers, data, completed=True) +def print_rate_limiting_info(gh): + # Compute some info about our GitHub API Rate Limit. + # Note that it doesn't count against our limit to + # get this info. So, we should be doing this regularly + # to better know when it is going to run out. Also, + # this will help us better understand where we are + # spending it and how to better optimize it. + + # Get GitHub API Rate Limit usage and total + gh_api_remaining, gh_api_total = gh.rate_limiting + + # Compute time until GitHub API Rate Limit reset + gh_api_reset_time = gh.rate_limiting_resettime + gh_api_reset_time = datetime.utcfromtimestamp(gh_api_reset_time) + gh_api_reset_time -= datetime.utcnow() + + print("") + print("GitHub API Rate Limit Info:") + print("---------------------------") + print("Currently remaining {remaining} out of {total}.".format(remaining=gh_api_remaining, total=gh_api_total)) + print("Will reset in {time}.".format(time=gh_api_reset_time)) + print("") + + if __name__ == '__main__': is_merged_pr = (os.environ.get('TRAVIS_BRANCH') == 'master' and os.environ.get('TRAVIS_PULL_REQUEST') == 'false') @@ -102,8 +126,14 @@ def write_token(name, token): write_token('appveyor', os.environ['APPVEYOR_TOKEN']) if 'CIRCLE_TOKEN' in os.environ: write_token('circle', os.environ['CIRCLE_TOKEN']) + gh = None if 'GH_TOKEN' in os.environ: write_token('github', os.environ['GH_TOKEN']) + gh = Github(os.environ['GH_TOKEN']) + + # Get our initial rate limit info. + print_rate_limiting_info(gh) + owner_info = ['--organization', 'conda-forge'] @@ -125,8 +155,8 @@ def write_token(name, token): feedstock_dirs.append([feedstock_dir, name, recipe_dir]) subprocess.check_call(['git', 'remote', 'add', 'upstream_with_token', - 'https://conda-forge-admin:{}@github.com/conda-forge/{}'.format(os.environ['GH_TOKEN'], - os.path.basename(feedstock_dir))], + 'https://conda-forge-manager:{}@github.com/conda-forge/{}'.format(os.environ['GH_TOKEN'], + os.path.basename(feedstock_dir))], cwd=feedstock_dir) # Sometimes we already have the feedstock created. We need to deal with that case. @@ -141,34 +171,9 @@ def write_token(name, token): else: subprocess.check_call(['conda', 'smithy', 'register-github', feedstock_dir] + owner_info) - gh = None conda_forge = None teams = None - if 'GH_TOKEN' in os.environ: - gh = Github(os.environ['GH_TOKEN']) - - # Compute some info about our GitHub API Rate Limit. - # Note that it doesn't count against our limit to - # get this info. So, we should be doing this regularly - # to better know when it is going to run out. Also, - # this will help us better understand where we are - # spending it and how to better optimize it. - - # Get GitHub API Rate Limit usage and total - gh_api_used, gh_api_total = gh.rate_limiting - - # Compute time until GitHub API Rate Limit reset - gh_api_reset_time = gh.rate_limiting_resettime - gh_api_reset_time = datetime.utcfromtimestamp(gh_api_reset_time) - gh_api_reset_time -= datetime.utcnow() - - print("") - print("GitHub API Rate Limit Info:") - print("---------------------------") - print("Currently used {used} out of {total}.".format(used=gh_api_used, total=gh_api_total)) - print("Will reset in {time}.".format(time=gh_api_reset_time)) - print("") - + if gh: # Only get the org and teams if there is stuff to add. if feedstock_dirs: conda_forge = gh.get_organization('conda-forge') @@ -259,7 +264,7 @@ def write_token(name, token): if is_merged_pr: # Capture the output, as it may contain the GH_TOKEN. out = subprocess.check_output(['git', 'remote', 'add', 'upstream_with_token', - 'https://conda-forge-admin:{}@github.com/conda-forge/staged-recipes'.format(os.environ['GH_TOKEN'])], + 'https://conda-forge-manager:{}@github.com/conda-forge/staged-recipes'.format(os.environ['GH_TOKEN'])], stderr=subprocess.STDOUT) subprocess.check_call(['git', 'commit', '-m', msg]) # Capture the output, as it may contain the GH_TOKEN. @@ -267,3 +272,7 @@ def write_token(name, token): stderr=subprocess.STDOUT) else: print('Would git commit, with the following message: \n {}'.format(msg)) + + if gh: + # Get our final rate limit info. + print_rate_limiting_info(gh) diff --git a/.travis.yml b/.travis.yml index f2c6b7cbb5157..9322c27896f2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,8 @@ env: # Add the BINSTAR_TOKEN environment variable. This has been generated with "" then "travis encrypt BINSTAR_TOKEN=" - secure: "WgworyUp3oy/lyP3Dd+1bxs13rAyjbGqwWLK1XQUUOkHV6uKt5ZHFBbKRtYDnrQLSx9aAu/DDbh47L1nE1XL4C7u+S018GL+w7UBwGHkWHxBkr0TlYeVGCtjCo0QXk//L+JJXfnQ/2voCeqUkypD/O28vUfreVaXBpjnRlAzYmysFoDYl86/+nxKcSRW9+twbKk5xWroyDF+Ed7lCmXvqGWKMcOu14Wp30C2hKi3lfPyV3AzQ/lSQmwDcoCVIMsUE4+AFZAhub3T6C/EWURgfMjoX861iG/9vgJgnLdn3TsVW3WN88b8b+AR3EstnBL4ZJcpS1BwPF1hj9ER5av4vGkn39ahKVhWvUJO04Z+L7Ag8uoSypQsSAjlm7g82nph7EcpjymZ2BW0kqShs4jLwz3iO7I/ipjUYwlgAXInsTRgBjwbdf8YOKJYVnoLZNiv5seRow6BiVPNEmiQ3z9GH2Xt1emVxYdCcMscvyqmTQeZrQKHsseo5BoENh4Rq86CKtP9Orx1tIWrZ1Ujbfx4MpXFBbkzB6wNb+KZ+xPv3uD7DrWdaurZ2Kgm6HBY8YYHyq286halRZ3ngPXHgVW7aRVr5yH/uw8hXGr64cboIXhqt7wgZaHFy1BXAVfyqsNAB3qkisQEQSXmB4R8l7gua+zVNaOwz7LjW0mzcCpQhz8=" - # Add the GH_TOKEN environment variable. (This is the "conda-forge.github.io" token for the conda-forge-admin user.) - - secure: "hT3MZHjghHcNSTb0ILwP6aErtiYNN2mf+CKNaFeGBfDv9MjhNAWnph92Kx+hsPRKa3GWLEqUpLQo33ynvesj430Ok1qeQK9BrM2/3YHDxpWkvG+dHTg2+dmKlveYIVG+SUeU+g/vERVwryOYj73tMH/vC53u6PNcaTeuphzI3pKOcoxYmchzVLAJCMEXtI8MPXchFKIwRxkj2DcN1ApJm0ZeBnegvsH5VeCVkbDOEMwOylCFV7JcywN2pIh7aE7cWrm3HTEmC26E2O0k6K0h666Hpgh7Ia9wDViyt3GAopTUcR2+9fyeQ8RK3CJVbDnRPTgt92EKUpuMTvsEVOpdFFyJXcmEqyd89ZGGnvXQHQADIFJJBRyT0qb2I3haytV3u5UiWtBMwuGaURILxvUb33x+KDKTfeS0DtV6O18H+BGkFcj5UUVRICk0wob1B9NTFGlukeQRM5rzrz5uTA/SOVYHEyFca5EsHa0Iq0T8ec3bsNj7/qH9ecvcVJCE1pOGPrgb89pshfe5LB36mwgan1YwkvtHxlBtb/0WT8bwc0fCuO8Q720lprJ6wu3fF4rM4vHGn99fgjcu7LnjXixw9chg1IraUO5LLjJJDJYlbv4+Lu5+2jrt99cQSmpjIhYqNLbBd2UQvbNxj/wDsKun1knjRhkUqClvu8plk8crARc=" + # Add the GH_TOKEN environment variable. (This is the "conda-forge.github.io" token for the conda-forge-manager user.) + - secure: "QVcAIw1ezgkfZ70nNQBsr03V9tzXv0Hb+mw759gNo1CBbydYTO5EutWUt/Nks6E12/SkX5I3CmlAHZC74dQXVzQVyU/+hdc0El2N51gkvJ02dua7701ClqOHbkZSPGxE2j/S7ERzJKdtH97N0EGILP9wnadQJs5kpF9MvB1oWOQmDmsGMZ6GGlj2FMfL/TmtNR4ADo8rxr/ylw1kX8anfrXCv7FShdviugpsjSpAQLShKbdeDPdhvrD8W0TlpUhgdgSU2kPXd6gfGKuety1EWh56MgarHg+unntvB8R2W0O07RgOiRa/Mplmeng18dUCJdT1i3rczB2BkeyeFeCihtXqa0KDx7bX4z1X+4YFrBNl/bnDeVijaBtvkK3T0lluVnmVWolRzO9Tc2LozzAUEhDih4QFL6QtxQP2NkRFY2xEcj0JWbBNvDCik7hakiuxBSSbzGr1/3zw2sRh35/6qB6Y7mE6a5Pk+MS1ExS3Z8YUp4Q9l589DeyBCNE6HQHwEdvzEPUW74Lm566lzhsI8D4IuVYZDZLi/HHPzfPav4WWj5jiwlLx9XOkfPgz6ezqLoThkKSp5JmpXxxWzrckOMzFOyUqqD9h7De80uJqM/SW926fCr4RrrExcimblNV0ro9SSHUUvw+ZEFM51P7Z2m6ATBMO7/lVQtpj4XCbs6M=" # Add the CIRCLE_TOKEN environment variable. (This will need re-generating in the near future using the conda-forge-admin user) - secure: "XL4LyXKdyrKDGLj5LbWyoZij3+p4qsxR8kRZyHaaDhes7QipDGTVgUVylFagsC0sdY8Osi19pY2oZnzDwfkO66lL0cswRUfjIs7XHDv7jMX3aIL1awykkp2YWJvUtqw2yY58nRRcAoWXWuaIKa7gjBm8b2Rnx60GWwudEqzCsNjq29uePYHQyRSwHbK99mliwVz7TLt994S41TJzAp+expRvBO/bvBnDvDK1ZAm0P6v5HSCJJt8or+PmP5Au8LuEIIZbKM2KmQeaWqkYz09f4NWuA/lVqaQucv+eR/46QXWhLyp4pC56xeD/oTfi48u4skjLlRamtLKQ3YspL7fuKYtV+EGKwY/xAUyeLei10kE2OaBr66S+OhUkQYSgkeqdJuvKznImqCF4CGYyoOmdqqDy8lXVi2VcTqzHT8UxdVpc6CPiifczIAii34qdbpcUQRFnYm+5tWBQ8F1swM5ZihIE7t9wl3eoHjNxTFxF65DlNoUkHUfWb08luof83kNQapI9P8oplmrw46MAQFbd54NPbRruExvimCQm3FXbrWi0vLUzNcEn7QIautZJMpW8MKkQZBzlIpkH9P2THZcqvoJLx2uuKaF982vYnrgqgegxzIw10MIUUsTXF3jXdLPh9yo/4ewvK3G9SmJaidUmyoAPJrbej9Y25nMYYzOFDxo=" diff --git a/README.md b/README.md index 27433a664b1d5..d43a6ec898fb8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ +Adding your package to conda-forge +---------------------------------- + +1. Fork this repository. +2. Make a new folder in `recipes` for your package. Look at the example recipe and our [FAQ](https://github.com/conda-forge/staged-recipes/wiki/Frequently-asked-questions) for help. +3. Open a pull request. Building of your package will be tested on Windows, Mac and Linux. +4. When your pull request is merged a new repository, called a feedstock, will be create in the github conda-forge organization, and build/upload of your package will automatically be triggered. Once complete, the package is available on conda-forge. + About ----- diff --git a/appveyor.yml b/appveyor.yml index 70d58e580365e..1faacc2edba0b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,21 +14,27 @@ environment: - TARGET_ARCH: "x86" CONDA_PY: "27" PY_CONDITION: "python >=2.7,<3" + CONDA_INSTALL_LOCN: "C:\\Miniconda" - TARGET_ARCH: "x86" CONDA_PY: "34" PY_CONDITION: "python >=3.4,<3.5" + CONDA_INSTALL_LOCN: "C:\\Miniconda3" - TARGET_ARCH: "x86" CONDA_PY: "35" PY_CONDITION: "python >=3.5" + CONDA_INSTALL_LOCN: "C:\\Miniconda35" - TARGET_ARCH: "x64" CONDA_PY: "27" PY_CONDITION: "python >=2.7,<3" + CONDA_INSTALL_LOCN: "C:\\Miniconda-x64" - TARGET_ARCH: "x64" CONDA_PY: "34" PY_CONDITION: "python >=3.4,<3.5" + CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64" - TARGET_ARCH: "x64" CONDA_PY: "35" PY_CONDITION: "python >=3.5" + CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64" artifacts: # Store built conda packages as artifacts @@ -64,11 +70,17 @@ install: - cmd: rmdir C:\cygwin /s /q # Use the pre-installed Miniconda for the desired arch - - ps: if($env:TARGET_ARCH -eq 'x86') - {$root = "C:\Miniconda"} - else - {$root = "C:\Miniconda-x64"} - $env:path="$root;$root\Scripts;$root\Library\bin;$($env:path)" + # + # However, it is really old. So, we need to update some + # things before we proceed. That seems to require it being + # on the path. So, we temporarily put conda on the path + # so that we can update it. Then we remove it so that + # we can do a proper activation. + - cmd: set "OLDPATH=%PATH%" + - cmd: set "PATH=%CONDA_INSTALL_LOCN%\\Scripts;%CONDA_INSTALL_LOCN%\\Library\\bin;%PATH%" + - cmd: conda update --yes --quiet conda + - cmd: set "PATH=%OLDPATH%" + - cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat - cmd: conda config --add channels conda-forge - cmd: conda config --set show_channel_urls true - cmd: conda update --yes --quiet conda diff --git a/recipes/example/bld.bat b/recipes/example/bld.bat deleted file mode 100644 index 9aceaccc0d7c9..0000000000000 --- a/recipes/example/bld.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo print('An example') > %SP_DIR%\example.py -if errorlevel 1 exit 1 diff --git a/recipes/example/build.sh b/recipes/example/build.sh deleted file mode 100644 index 1439041856a72..0000000000000 --- a/recipes/example/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -echo "print('Testing an example package.')" > $SP_DIR/example.py diff --git a/recipes/example/meta.yaml b/recipes/example/meta.yaml index c91eba44f91e6..9a37c13ec11ae 100644 --- a/recipes/example/meta.yaml +++ b/recipes/example/meta.yaml @@ -1,34 +1,55 @@ -{% set version = "1.0" %} +# Jinja variables help maintain the recipe as you'll update the version only here. +{% set version = "3.8.2" %} +{% set sha256 = "d58439c548433adcda98e695be53e526ba940a4b9c44fb9a05d92cd495cdd47f" %} package: - name: example + name: simplejson version: {{ version }} source: - git_url: https://github.com/conda-forge/staged-recipes.git - git_tag: 24507f6c6b2d2e03caee550e13830df15d791751 + fn: simplejson-{{ version }}.tar.gz + url: https://pypi.io/packages/source/s/simplejson/simplejson-{{ version }}.tar.gz + # md5 is OK but sha256 is desirable. + sha256: {{ sha256 }} build: number: 0 + # If the installation is complex, or different between Unix and Windows, use separate bld.bat and build.sh files instead of this key. + script: python setup.py install --single-version-externally-managed --record record.txt requirements: build: - python + # When setuptools is available add the `--single-version-externally-managed --record record.txt` above. + - setuptools run: - python test: + # Some package might need a `test/commands` key to check CLI. imports: - - example - commands: - - python -c "import example;" + - simplejson + - simplejson.tests about: - home: https://github.com/conda-forge/staged-recipes - license: BSD - summary: An example package + home: http://github.com/simplejson/simplejson + # Remember to specify the license variants for BSD, Apache, GPL, and LGLP. + # Prefer the short version, e.g: GPL-2.0 instead of GNU General Public License version 2.0 + # See https://opensource.org/licenses/alphabetical + license: MIT + summary: 'Simple, fast, extensible JSON encoder/decoder for Python' + + # The remaining entries in this section are optional, but recommended + description: | + simplejson is a simple, fast, complete, correct and extensible + JSON encoder and decoder for Python 2.5+ and + Python 3.3+. It is pure Python code with no dependencies, but includes + an optional C extension for a serious speed boost. + doc_url: http://simplejson.readthedocs.io/ + dev_url: https://github.com/simplejson/simplejson extra: recipe-maintainers: + # Always check with the people listed below if they are OK becoming maintainers of the recipe. (There will be spam!) - HomerSimpson - LukeSkywalker diff --git a/recipes/sphinx-bootstrap-theme/meta.yaml b/recipes/sphinx-bootstrap-theme/meta.yaml deleted file mode 100644 index 0e987f8b6845f..0000000000000 --- a/recipes/sphinx-bootstrap-theme/meta.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{% set version = "0.4.9" %} -package: - name: sphinx-bootstrap-theme - version: {{ version }} - -source: - url: https://github.com/ryan-roemer/sphinx-bootstrap-theme/archive/v{{ version }}.tar.gz - fn: sphinx-bootstrap-theme-v{{ version }}.tar.gz - sha256: 25f044cb1a028a0c4c301241d51aac36171dbe74f4ef476b8030d62b37fb8e11 - -build: - preserve_egg_dir: True - number: 0 - script: python setup.py install --single-version-externally-managed --record=record.txt - -requirements: - build: - - python - - setuptools - - run: - - python - -test: - imports: - - sphinx_bootstrap_theme - -about: - home: http://ryan-roemer.github.com/sphinx-bootstrap-theme/README.html - license: MIT License - summary: 'Sphinx Bootstrap Theme.' - -extra: - recipe-maintainers: - - ericdill - - licode - - tacaswell diff --git a/recipes/tzlocal/meta.yaml b/recipes/tzlocal/meta.yaml deleted file mode 100644 index 4d260e31e3b11..0000000000000 --- a/recipes/tzlocal/meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ -{% set version = "1.1.2" %} - -package: - name: tzlocal - version: {{ version }} - -source: - fn: tzlocal-{{ version }}.tar.gz - url: https://github.com/regebro/tzlocal/archive/{{ version }}.tar.gz - sha256: 939de4cf9535f61a5c1a99f34a447e3992f8046fd1bedeac9ec7892b419cf963 - -build: - number: 0 - script: python setup.py install --single-version-externally-managed --record=record.txt - -requirements: - build: - - python - - setuptools - - pytz - - run: - - python - - pytz - -test: - imports: - - tzlocal - requires: - - setuptools - commands: - - cd {{ environ.SRC_DIR }} && python setup.py test - -about: - home: https://github.com/regebro/tzlocal - license: CC0 1.0 Universal - summary: 'tzinfo object for the local timezone' - -extra: - recipe-maintainers: - - ericdill - - licode - - tacaswell diff --git a/recipes/zwatershed/meta.yaml b/recipes/zwatershed/meta.yaml index 7fbc0af92513c..f724de3c8f957 100644 --- a/recipes/zwatershed/meta.yaml +++ b/recipes/zwatershed/meta.yaml @@ -1,6 +1,6 @@ {% set name = "zwatershed" %} -{% set version = "0.5" %} -{% set checksum = "df5b36634e38012e0fb3b2545d3bfc26" %} +{% set version = "0.8" %} +{% set checksum = "e48b08909ad95785d9adfee0d1f8d318" %} package: name: {{ name }} @@ -14,10 +14,19 @@ source: build: skip: true # [win or py3k] number: 0 - script: python setup.py install --single-version-externally-managed --record record.txt + script: + # FIXME: This is a hack to make sure the environment is activated. + # The reason this is required is due to the conda-build issue + # mentioned below. + # + # https://github.com/conda/conda-build/issues/910 + # + - source activate "${CONDA_DEFAULT_ENV}" + - python setup.py install --single-version-externally-managed --record record.txt requirements: build: + - toolchain - boost 1.61.* - python - setuptools >=18.0