-
Notifications
You must be signed in to change notification settings - Fork 3
/
conda.sh
35 lines (27 loc) · 851 Bytes
/
conda.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# clean slate
rm -rf conda outputdir
conda-build purge-all
conda config --set anaconda_upload yes
platform=`uname`
if [ $platform == 'Darwin' ] ; then
plat='osx-64'
else
plat='linux-64'
fi
# current dir (assume that is the package name)
name=${PWD##*/}
# conda skeleton with meta info
conda skeleton pypi --output-dir conda $name
# for for each version of python
for pythonversion in 3.8 3.9 3.10 3.11 3.12 ; do
conda-build --python $pythonversion $@ conda/$name
done
# upload osx versions and convert to other architectures (assuming python only)
for path in `find $CONDA_PREFIX/conda-bld/$plat/ -name "$name-[0-9]*.bz2"`; do
anaconda upload $path
conda convert --platform all $path -o outputdir/
done
# upload versios for other architectures
for path in `find outputdir -name '*.bz2'`; do
anaconda upload $path
done