Commit 55552fbd authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Maybe this will work?

parent ade028fb
......@@ -2,45 +2,23 @@
conda update conda
conda install setuptools conda-build
cd .conda
mkdir -p ../dist
# get version and name
version=`python ../setup.py -V`
name=`python ../setup.py --name`
# get requirements, and make
# them conda compatible...
# strip all spaces
reqs=`cat ../requirements.txt ../requirements-dev.txt | sed -e 's/ //g'`
# add a space after package name -
# package names must match a-zA-Z0-9_
reqs=`echo "$reqs" | sed -e "s/^[a-zA-Z0-9_][a-zA-Z0-9_]*/& /g"`
# remove ==, replace it with a space
reqs=`echo "$reqs" | sed -e "s/==/ /g"`
cat ../requirements.txt > requirements.txt
cat ../requirements-dev.txt >> requirements.txt
# wrap each dep in quotes
reqs=`echo "$reqs" | sed -e "s/^.*$/'&'/g"`
echo "{% set name = '$name' %}" > vars.txt
echo "{% set version = '$version' %}" >> vars.txt
# add a comma at the end
reqs=`echo "$reqs" | sed -e "s/$/,/g"`
# remove newlines
reqs=`echo $reqs`
echo "version: $version"
echo "name: $name"
echo "reqs: $reqs"
echo "{% set name = 'name' %}" > vars.txt
echo "{% set version = '$version' %}" >> vars.txt
echo "{% set requirements = [$reqs] %}" >> vars.txt
cat vars.txt meta.yaml > tempfile
mv tempfile meta.yaml
rm vars.txt
conda build fslpy
cd ..
conda build --output-folder=../dist .
"%PYTHON%" setup.py install
if errorlevel 1 exit 1
$PYTHON setup.py install # Python command to install the script.
......@@ -2,6 +2,11 @@ package:
name: '{{ name }}'
version: '{{ version }}'
build:
noarch: python
script: python setup.py install --single-version-externally-managed --record=record.txt
source:
path:
../
......@@ -10,12 +15,6 @@ requirements:
build:
- python
- setuptools
{% for r in requirements %}
- {{ r }}
{% endfor %}
run:
- python
{% for r in requirements %}
- {{ r }}
{% endfor %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment