Skip to content
Snippets Groups Projects
Commit 55552fbd authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

Maybe this will work?

parent ade028fb
No related branches found
No related tags found
No related merge requests found
...@@ -2,45 +2,23 @@ ...@@ -2,45 +2,23 @@
conda update conda conda update conda
conda install setuptools conda-build conda install setuptools conda-build
cd .conda cd .conda
mkdir -p ../dist
# get version and name # get version and name
version=`python ../setup.py -V` version=`python ../setup.py -V`
name=`python ../setup.py --name` name=`python ../setup.py --name`
# get requirements, and make cat ../requirements.txt > requirements.txt
# them conda compatible... cat ../requirements-dev.txt >> requirements.txt
# 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"`
# wrap each dep in quotes echo "{% set name = '$name' %}" > vars.txt
reqs=`echo "$reqs" | sed -e "s/^.*$/'&'/g"` 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 cat vars.txt meta.yaml > tempfile
mv tempfile meta.yaml mv tempfile meta.yaml
rm vars.txt rm vars.txt
conda build fslpy conda build --output-folder=../dist .
cd ..
"%PYTHON%" setup.py install
if errorlevel 1 exit 1
$PYTHON setup.py install # Python command to install the script.
...@@ -2,6 +2,11 @@ package: ...@@ -2,6 +2,11 @@ package:
name: '{{ name }}' name: '{{ name }}'
version: '{{ version }}' version: '{{ version }}'
build:
noarch: python
script: python setup.py install --single-version-externally-managed --record=record.txt
source: source:
path: path:
../ ../
...@@ -10,12 +15,6 @@ requirements: ...@@ -10,12 +15,6 @@ requirements:
build: build:
- python - python
- setuptools - setuptools
{% for r in requirements %}
- {{ r }}
{% endfor %}
run: run:
- python - python
{% for r in requirements %}
- {{ r }}
{% endfor %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment