-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NB] Use Conda build jinja template support
Use Conda build [jinja template support][1]. Conda package can be built directly from source directory by running: conda build .conda-recipe [1]: http://conda.pydata.org/docs/building/meta-yaml.html#templating-with-jinja
- Loading branch information
Showing
6 changed files
with
53 additions
and
22 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
@echo off | ||
REM Construct version tag from Conda [Git environment variables][1]. | ||
REM | ||
REM [1]: http://conda.pydata.org/docs/building/environment-vars.html#git-environment-variables | ||
set MINOR_VERSION=%GIT_DESCRIBE_TAG:~1% | ||
if %GIT_DESCRIBE_NUMBER%==0 ( | ||
set PACKAGE_VERSION=%MINOR_VERSION% | ||
) else ( | ||
set PACKAGE_VERSION=%MINOR_VERSION%.post%GIT_DESCRIBE_NUMBER% | ||
) | ||
|
||
REM Generate `setup.py` from `pavement.py` definition. | ||
"%PYTHON%" -m paver generate_setup | ||
|
||
REM **Workaround** `conda build` runs a copy of `setup.py` named | ||
REM `conda-build-script.py` with the recipe directory as the only argument. | ||
REM This causes paver to fail, since the recipe directory is not a valid paver | ||
REM task name. | ||
REM | ||
REM We can work around this by popping the recipe directory command line | ||
REM argument off if the `setup.py` script is run under the name | ||
REM `conda-build-script.py`. | ||
"%PYTHON%" -c "input_ = open('setup.py', 'r'); data = input_.read(); input_.close(); output_ = open('setup.py', 'w'); output_.write('\n'.join(['import sys', 'import path_helpers as ph', '''if ph.path(sys.argv[0]).name == 'conda-build-script.py':''', ' sys.argv.pop()', data])); output_.close(); print open('setup.py', 'r').read()" | ||
|
||
REM Install source directory as Python package. | ||
"%PYTHON%" -m pip install --no-cache --find-links http://192.99.4.95/wheels --trusted-host 192.99.4.95 . | ||
if errorlevel 1 exit 1 | ||
|
||
:: Add more build steps here, if they are necessary. | ||
|
||
:: See | ||
:: http://docs.continuum.io/conda/build.html | ||
:: for a list of environment variables that are set during the build process. | ||
if not exist "%PREFIX%\Menu" mkdir "%PREFIX%\Menu" | ||
copy "%RECIPE_DIR%\microdrop.ico" "%PREFIX%\Menu" | ||
copy "%RECIPE_DIR%\Iconleak-Atrous-Console.ico" "%PREFIX%\Menu" | ||
copy "%RECIPE_DIR%\microdrop-launcher.json" "%PREFIX%\Menu" |
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.