Skip to content

Commit

Permalink
Improve anaconda build process.
Browse files Browse the repository at this point in the history
Anaconda build was broken due to local files containing third party
projects.

Summary of Changes:

1. Build recipe from GitHub master branch instead of local path

2. Move anaconda recipe to a separate folder to avoid including
unintended large files in the build

3. Update Makefile to work with the current file structure
  • Loading branch information
lijunzh committed Nov 4, 2019
1 parent 1c6bdfa commit 41b6e64
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 10 deletions.
8 changes: 5 additions & 3 deletions .gitignore
@@ -1,3 +1,8 @@
# project specific
*.pth
/rbp
/experimental

# ctags
tags
!tags/
Expand Down Expand Up @@ -106,6 +111,3 @@ venv.bak/

# mypy
.mypy_cache/
*.pth
/rbp
/experimental
9 changes: 8 additions & 1 deletion CHANGELOG.rst
Expand Up @@ -8,7 +8,14 @@ Development versions
Experimental versions
=====================

Version 0.0.5, Under Development
Version 0.0.7, Under Development
--------------------------------

- Move anaconda recipe to a separate directory to avoid building unintended
programs
- Build anaconda package from github master branch instead local path

Version 0.0.6, 2019-11-04
--------------------------------

- experiment with Raspberry Pi deployment
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Expand Up @@ -2,8 +2,10 @@

.PHONY: clean test anaconda pypi build wait release

release: test wait clean build wait
anaconda upload $(shell conda build . --output)
release: test wait clean build wait upload

upload:
$(MAKE) -C anaconda upload
twine upload dist/* -r pypi

test:
Expand All @@ -15,12 +17,13 @@ wait:
build: anaconda pypi

anaconda:
time conda build . -c pytorch
$(MAKE) -C $@ build

pypi:
python setup.py dists
twine check dist/*

clean:
find . | grep -E "(__pycache__|\.pyc|\.pyo)" | xargs rm -rf
$(MAKE) -C anaconda clean
rm -rf build dist .eggs htmlcov *.npy *.tar.bz2 ._* .coverage .pytest_cache
12 changes: 12 additions & 0 deletions anaconda/Makefile
@@ -0,0 +1,12 @@
#!/bin/sh

.PHONY: clean build upload

build:
time conda build . -c pytorch --output-folder build

upload:
anaconda upload build/noarch/yews*

clean:
rm -rfv build/*
10 changes: 7 additions & 3 deletions meta.yaml → anaconda/meta.yaml
Expand Up @@ -6,10 +6,12 @@ package:
version: {{ version }}

source:
path: .
#path: .
#url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
#sha256: {{ sha256 }}
#git_url: https://github.com/lijunzh/yews.git
git_url: https://github.com/lijunzh/yews.git
git_branch: master
git_depth: 1
#git_tag: {{ version }}

build:
Expand All @@ -19,14 +21,16 @@ build:

requirements:
host:
- python >=3.6
- pip
- python >=3.6
- pytest-runner
run:
- python >=3.6
- numpy >=1.16
- scipy >=1.2
- pytorch >=1.0
- obspy
- tqdm

test:
imports:
Expand Down

0 comments on commit 41b6e64

Please sign in to comment.