conda build

This commit is contained in:
rasbt
2016-05-29 03:41:18 -04:00
parent acee4e7d28
commit e3cb6be9cb
7 changed files with 220 additions and 14 deletions
+8
View File
@@ -0,0 +1,8 @@
"%PYTHON%" setup.py install
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.
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
$PYTHON setup.py install
# 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.
+79
View File
@@ -0,0 +1,79 @@
package:
name: mlxtend
version: "0.4.1"
source:
fn: mlxtend-0.4.1.tar.gz
url: https://files.pythonhosted.org/packages/e2/e5/12927e24d3161460a651b7ed1724a45e39b7bb5e6854b1d63812dd9977a6/mlxtend-0.4.1.tar.gz
md5: 113df88a3b3881f3d209705fdc156696
# patches:
# List any patch files here
# - fix.patch
# build:
# noarch_python: True
# preserve_egg_dir: True
# entry_points:
# Put any entry points (scripts to be generated automatically) here. The
# syntax is module:function. For example
#
# - mlxtend = mlxtend:main
#
# Would create an entry point called mlxtend that calls mlxtend.main()
# If this is a new build for the same version, increment the build
# number. If you do not include this key, it defaults to 0.
# number: 1
requirements:
build:
- python
- setuptools
- numpy >=1.10.4
- scipy >=0.17
- scikit-learn >=0.17.1
- pandas >=0.17
- matplotlib
run:
- python
- numpy >=1.10.4
- scipy >=0.17
- scikit-learn >=0.17.1
- pandas >=0.17
- matplotlib
test:
# Python imports
imports:
- mlxtend
- mlxtend._base
- mlxtend.classifier
- mlxtend.cluster
- mlxtend.data
- mlxtend.evaluate
- mlxtend.externals
- mlxtend.feature_extraction
- mlxtend.feature_selection
- mlxtend.file_io
- mlxtend.general_plotting
- mlxtend.math
- mlxtend.preprocessing
- mlxtend.regression_utils
- mlxtend.regressor
- mlxtend.text
#- mlxtend.tf_classifier
#- mlxtend.tf_cluster
#- mlxtend.tf_regressor
- mlxtend.utils
about:
home: https://github.com/rasbt/mlxtend
license: BSD License
summary: 'Machine Learning Library Extensions'
# See
# http://docs.continuum.io/conda/build.html for
# more information about meta.yaml
+30 -7
View File
@@ -52,18 +52,41 @@ Sebastian Raschka 2014-2016
## Installing mlxtend
To install `mlxtend`, just execute
#### PyPI
pip install mlxtend
To install mlxtend, just execute
The `mlxtend` version on PyPI may always one step behind; you can install the latest development version from this GitHub repository by executing
pip install git+git://github.com/rasbt/mlxtend.git#egg=mlxtend
```bash
pip install mlxtend
```
Alternatively, you download the package manually from the Python Package Index [https://pypi.python.org/pypi/mlxtend](https://pypi.python.org/pypi/mlxtend), unzip it, navigate into the package, and use the command:
python setup.py install
```bash
python setup.py install
```
#### Dev Version
The mlxtend version on PyPI may always one step behind; you can install the latest development version from the GitHub repository by executing
```bash
pip install git+git://github.com/rasbt/mlxtend.git#egg=mlxtend
```
Or, you can fork the GitHub repository from https://github.com/rasbt/mlxtend and install mlxtend from your local drive via
```bash
python setup.py install
```
#### Anaconda/Conda
Conda packages are now available for Mac, Windows, and Linux. You can install mlxtend using conda by executing
```bash
conda install -c rasbt mlxtend
```
<br>
+66
View File
@@ -413,3 +413,69 @@ Finally, to cleanup our local drive, remove the virtual testing environment via
```bash
$ conda remove --name 'mlxtend-testing' --all
```
## Creating a Conda build
General instruction on how to create a Conda package can be found at [http://conda.pydata.org/docs/build_tutorials/pkgs.html](http://conda.pydata.org/docs/build_tutorials/pkgs.html).
**1.** Create a conda skeleton in your home directory:
```bash
conda skeleton pypi mlxtend --version 0.4.1
```
Executing the command above will create a new directory called `mlxtend`. Please inspect the meta.yaml file and modify section if appropriate.
**2.** Create builds for Python 2.7, 3.4, and 3.5 by executing the following commands:
```bash
conda build --python 2.7 mlxtend
conda build --python 3.5 mlxtend
conda build --python 3.4 mlxtend
```
**3.** Create a new conda environment and install the package locally to check if it works correctly:
```bash
conda create -n testmlxtend python=3
source activate testmlxtend
conda install --use-local mlxtend
conda uninstall mlxtend
```
**4.** Convert the packages for other platforms (modify the paths in the following commands if necessary):
```bash
conda convert --platform all /Users/Sebastian/miniconda3/conda-bld/osx-64/mlxtend-0.4.1-py27_0.tar.bz2 -o mlxtend_py27/
conda convert --platform all /Users/Sebastian/miniconda3/conda-bld/osx-64/mlxtend-0.4.1-py34_0.tar.bz2 -o mlxtend_py34/
conda convert --platform all /Users/Sebastian/miniconda3/conda-bld/osx-64/mlxtend-0.4.1-py35_0.tar.bz2 -o mlxtend_py35/
```
**5.** Finally, upload the packages to Anaconda.org (modify the paths in the following commands if necessary):
```bash
anaconda upload /Users/Sebastian/mlxtend_py35/win-64/mlxtend-0.4.1-py35_0.tar.bz2
anaconda upload /Users/Sebastian/mlxtend_py35/win-32/mlxtend-0.4.1-py35_0.tar.bz2
anaconda upload /Users/Sebastian/mlxtend_py35/osx-64/mlxtend-0.4.1-py35_0.tar.bz2
anaconda upload /Users/Sebastian/mlxtend_py35/linux-64/mlxtend-0.4.1-py35_0.tar.bz2
anaconda upload /Users/Sebastian/mlxtend_py35/linux-32/mlxtend-0.4.1-py35_0.tar.bz2
anaconda upload /Users/Sebastian/mlxtend_py34/win-64/mlxtend-0.4.1-py34_0.tar.bz2
anaconda upload /Users/Sebastian/mlxtend_py34/win-32/mlxtend-0.4.1-py34_0.tar.bz2
anaconda upload /Users/Sebastian/mlxtend_py34/osx-64/mlxtend-0.4.1-py34_0.tar.bz2
anaconda upload /Users/Sebastian/mlxtend_py34/linux-64/mlxtend-0.4.1-py34_0.tar.bz2
anaconda upload /Users/Sebastian/mlxtend_py34/linux-32/mlxtend-0.4.1-py34_0.tar.bz2
anaconda upload /Users/Sebastian/mlxtend_py27/win-64/mlxtend-0.4.1-py27_0.tar.bz2
anaconda upload /Users/Sebastian/mlxtend_py27/win-32/mlxtend-0.4.1-py27_0.tar.bz2
anaconda upload /Users/Sebastian/mlxtend_py27/osx-64/mlxtend-0.4.1-py27_0.tar.bz2
anaconda upload /Users/Sebastian/mlxtend_py27/linux-64/mlxtend-0.4.1-py27_0.tar.bz2
anaconda upload /Users/Sebastian/mlxtend_py27/linux-32/mlxtend-0.4.1-py27_0.tar.bz2
```
**6.** Install the deployed packages to check if the upload was successful:
```bash
conda install -c rasbt mlxtend
conda uninstall mlxtend
```
+25 -7
View File
@@ -2,20 +2,38 @@
---
To install `mlxtend`, just execute
### PyPI
To install mlxtend, just execute
```bash
pip install mlxtend
```
The `mlxtend` version on PyPI may always one step behind; you can install the latest development version from the GitHub repository by executing
```bash
pip install git+git://github.com/rasbt/mlxtend.git#egg=mlxtend
```
Alternatively, you download the package manually from the Python Package Index [https://pypi.python.org/pypi/mlxtend](https://pypi.python.org/pypi/mlxtend), unzip it, navigate into the package, and use the command:
```bash
python setup.py install
```
### Dev Version
The mlxtend version on PyPI may always one step behind; you can install the latest development version from the GitHub repository by executing
```bash
pip install git+git://github.com/rasbt/mlxtend.git#egg=mlxtend
```
Or, you can fork the GitHub repository from https://github.com/rasbt/mlxtend and install mlxtend from your local drive via
```bash
python setup.py install
```
### Anaconda/Conda
Conda packages are now available for Mac, Windows, and Linux. You can install mlxtend using conda by executing
```bash
conda install -c rasbt mlxtend
```
+3
View File
@@ -19,6 +19,9 @@ setup(name='mlxtend',
package_data={'': ['LICENSE', 'README.md', 'requirements.txt']
},
include_package_data=True,
install_requires=['numpy>=1.10.4', 'scipy>=0.17'],
extras_require={'testing': ['nose'],
'docs': ['mkdocs']},
license='BSD 3-Clause',
platforms='any',
classifiers=[