This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
1,175 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
conda install --yes -q anaconda-client jinja2 | ||
cd %PYTHON_MINICONDA%\conda-bld | ||
dir /s /b %PACKAGENAME%-dev-*.tar.bz2 > files.txt | ||
for /F %%filename in (files.txt) do ( | ||
echo "uploading file %%~filename" | ||
anaconda -t %BINSTAR_TOKEN% upload --force -u %ORGNAME% -p %PACKAGENAME%-dev %%~filename | ||
) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
if [ "$TRAVIS_PULL_REQUEST" = true ]; then | ||
echo "This is a pull request. No deployment will be done."; exit 0 | ||
fi | ||
|
||
|
||
if [ "$TRAVIS_BRANCH" != "devel" ]; then | ||
echo "No deployment on BRANCH='$TRAVIS_BRANCH'"; exit 0 | ||
fi | ||
|
||
|
||
# Deploy to binstar | ||
conda install --yes anaconda-client jinja2 | ||
pushd . | ||
cd $HOME/miniconda/conda-bld | ||
FILES=*/${PACKAGENAME}-dev-*.tar.bz2 | ||
for filename in $FILES; do | ||
anaconda -t $BINSTAR_TOKEN upload --force -u ${ORGNAME} -p ${PACKAGENAME}-dev ${filename} | ||
done | ||
popd | ||
|
||
# call cleanup | ||
python devtools/ci/travis/dev_pkgs_del_old.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
""" | ||
Cleanup old development builds on Anaconda.org | ||
Assumes one has set two environment variables: | ||
1. BINSTAR_TOKEN: token to authenticate with anaconda.org | ||
2. DEV_BUILD_N_KEEP: int, how many builds to keep, delete oldest first. | ||
3. ORGNAME: str, anaconda.org organisation/user | ||
4. PACKGENAME: str, name of package to clean up | ||
author: Martin K. Scherer | ||
data: 20.4.16 | ||
""" | ||
from __future__ import print_function, absolute_import | ||
from binstar_client.utils import get_server_api | ||
from pkg_resources import parse_version | ||
from operator import getitem | ||
import os | ||
|
||
token = os.getenv['BINSTAR_TOKEN'] | ||
org = os.getenv['ORGNAME'] | ||
pkg = os.getenv['PACKAGENAME'] | ||
n_keep = int(os.getenv('DEV_BUILD_N_KEEP')) | ||
|
||
b = get_server_api(token=token) | ||
package = b.package(org, pkg) | ||
|
||
# sort releases by version number, oldest first | ||
sorted_by_version = sorted(package['releases'], | ||
key=lambda rel: parse_version(rel['version']), | ||
reverse=True | ||
) | ||
to_delete = [] | ||
|
||
while len(sorted_by_version) > N_KEEP: | ||
to_delete.append(sorted_by_version.pop()) | ||
|
||
# remove old releases from anaconda.org | ||
for rel in to_delete: | ||
spec = rel['full_name'] | ||
version = rel['version'] | ||
for dist in rel['distributions']: | ||
b.remove_dist(org, package_name=pkg, release=version, basename=dist) | ||
print("removed file %s" % dist) | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if not defined APPVEYOR ( | ||
echo not on appveyor | ||
"%PYTHON%" setup.py install | ||
) else ( | ||
echo on appveyor | ||
cmd /E:ON /V:ON /C %APPVEYOR_BUILD_FOLDER%\devtools\ci\appveyor\run_with_env.cmd "%PYTHON%" setup.py install | ||
) | ||
set build_status=%ERRORLEVEL% | ||
"%PYTHON%" devtools\conda-recipe\dev_version.py | ||
if %build_status% == 1 exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
$PYTHON setup.py install | ||
$PYTHON devtools/conda-recipe/dev_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from __future__ import print_function | ||
from pyemma import __version__ as version | ||
|
||
with open('__conda_version__.txt', 'w') as f: | ||
f.write(version) |
4 changes: 2 additions & 2 deletions
4
tools/conda-recipe/meta.yaml → devtools/conda-recipe/meta.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package: | ||
name: pyemma | ||
version: !!str dev | ||
name: pyemma-dev | ||
#version: 0 | ||
source: | ||
path: ../.. | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.