Skip to content

Commit 87cfa24

Browse files
committed
build for conda
1 parent 0af4ef6 commit 87cfa24

File tree

4 files changed

+116
-0
lines changed

4 files changed

+116
-0
lines changed

bld.bat

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
"%PYTHON%" setup.py install
2+
if errorlevel 1 exit 1
3+
4+
:: Add more build steps here, if they are necessary.
5+
6+
:: See
7+
:: http://docs.continuum.io/conda/build.html
8+
:: for a list of environment variables that are set during the build process.

build.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
$PYTHON setup.py install
4+
5+
# Add more build steps here, if they are necessary.
6+
7+
# See
8+
# http://docs.continuum.io/conda/build.html
9+
# for a list of environment variables that are set during the build process.

build_for_conda.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Initial setup was done using:
2+
3+
`conda skeleton pypi plotly --version 1.12.4`
4+
5+
To test all imports, manually added following dependencies at runtime:
6+
```
7+
- matplotlib
8+
- numpy
9+
- ipython
10+
- ipywidgets
11+
```
12+
13+
I also had to change all `module/submodule` in the test imports to `module.submodule`.
14+
15+
Finally, build and test the created version:
16+
17+
`conda build plotly`
18+
19+
Currently, the updated (version 1.12.4) conda package sits at https://anaconda.org/chohner/plotly. There seems to be an old offial package at https://anaconda.org/plotly/plotly.

meta.yaml

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
package:
2+
name: plotly
3+
version: "1.12.4"
4+
5+
source:
6+
fn: plotly-1.12.4.tar.gz
7+
url: https://files.pythonhosted.org/packages/02/e0/5b739403c3180298ebe277cbc9f5ee99e546ab24768b1732a2d6b381091b/plotly-1.12.4.tar.gz
8+
md5: f1ff6b1b18554258aab50449ab571ee2
9+
# patches:
10+
# List any patch files here
11+
# - fix.patch
12+
13+
# build:
14+
# noarch_python: True
15+
# preserve_egg_dir: True
16+
# entry_points:
17+
# Put any entry points (scripts to be generated automatically) here. The
18+
# syntax is module:function. For example
19+
#
20+
# - plotly = plotly:main
21+
#
22+
# Would create an entry point called plotly that calls plotly.main()
23+
24+
25+
# If this is a new build for the same version, increment the build
26+
# number. If you do not include this key, it defaults to 0.
27+
# number: 1
28+
29+
requirements:
30+
build:
31+
- python
32+
- setuptools
33+
- requests
34+
- six
35+
- pytz
36+
37+
run:
38+
- python
39+
- requests
40+
- six
41+
- pytz
42+
- matplotlib
43+
- numpy
44+
- ipython
45+
- ipywidgets
46+
47+
test:
48+
# Python imports
49+
imports:
50+
- plotly
51+
- plotly.graph_objs
52+
- plotly.grid_objs
53+
- plotly.matplotlylib
54+
- plotly.matplotlylib.mplexporter
55+
- plotly.matplotlylib.mplexporter.renderers
56+
- plotly.offline
57+
- plotly.plotly
58+
- plotly.plotly.chunked_requests
59+
- plotly.widgets
60+
61+
# commands:
62+
# You can put test commands to be run here. Use this to test that the
63+
# entry points work.
64+
65+
66+
# You can also put a file called run_test.py in the recipe that will be run
67+
# at test time.
68+
69+
# requires:
70+
# Put any additional test requirements here. For example
71+
# - nose
72+
73+
about:
74+
home: https://plot.ly/python/
75+
license: MIT
76+
summary: 'Python plotting library for collaborative, interactive, publication-quality graphs.'
77+
78+
# See
79+
# http://docs.continuum.io/conda/build.html for
80+
# more information about meta.yaml

0 commit comments

Comments
 (0)