Skip to content

Commit

Permalink
Add additional setup.py requirements (#3501)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajduberstein committed Aug 28, 2019
1 parent c57e167 commit bb15aa0
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ matrix:
before_install:
- cd bindings/python/pydeck
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start
- yes | npm install -g webpack webpack-cli babel-cli
python:
- '3.5'
- '2.7'
- "3.5"
- "2.7"
cache:
pip: true
directories:
Expand Down
1 change: 1 addition & 0 deletions bindings/python/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ __pycache__/
# Distribution / packaging
.Python
env/
env3/
build/
develop-eggs/
dist/
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/pydeck/requirejs_dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"paths": {
"deck.gl": "https://unpkg.com/deck.gl/dist.min",
"mapbox-gl": "https://api.tiles.mapbox.com/mapbox-gl-js/v1.2.1/mapbox-gl.js",
"mapbox-gl": "https://api.tiles.mapbox.com/mapbox-gl-js/v1.2.1/mapbox-gl",
"h3": "https://unpkg.com/h3-js@^3.4.3/dist/h3-js.umd",
"S2": "https://unpkg.com/s2-geometry@^1.2.10/src/s2geometry"
}
Expand Down
1 change: 0 additions & 1 deletion bindings/python/pydeck/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pytest-cov>=2.6.1
pytest-asyncio>=0.10.0;python_version>="3.5"
pathlib>=1.0.1;python_version<="2.7"
pyppeteer>=0.0.25;python_version>="3.5"
tox>=3.13.2
typing>=3.7.4;python_version<="3.5"
typing_extensions>=3.7.4;python_version<="3.5"
flake8
1 change: 1 addition & 0 deletions bindings/python/pydeck/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ipykernel>=5.1.2
ipywidgets>=7.0.0,<8
traitlets>=4.3.2
Jinja2>=2.10.1
11 changes: 6 additions & 5 deletions bindings/python/pydeck/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def read(*parts):


# build_all is read from the command line and `yarn bootstrap`
# for a frontend build instead of using `webpack` within @deck.gl/jupyter-widget
# for a frontend build instead of using `npm run build` within @deck.gl/jupyter-widget
build_all = False


Expand Down Expand Up @@ -100,8 +100,8 @@ def clean_frontend_build(self):

def has_build_utilities(self):
try:
check_call(["npm", "--version"], stdout=open(os.devnull, 'wb'))
check_call(["yarn", "--version"], stdout=open(os.devnull, 'wb'))
check_call(["webpack", "--version"], stdout=open(os.devnull, 'wb'))
return True
except Exception:
return False
Expand All @@ -123,7 +123,7 @@ def run(self):
has_build_utilities = self.has_build_utilities()
if not has_build_utilities:
log.error(
"`yarn` and/or `webpack` are unavailable but are necessary for this build."
"`yarn` and/or `npm` are unavailable but are necessary for this build."
)

env = os.environ.copy()
Expand All @@ -139,9 +139,9 @@ def run(self):
env=env,
)
else:
log.info("Installing build dependencies with webpack.")
log.info("Installing build dependencies with `npm run build`.")
check_call(
["webpack"],
["npm", "run", "build"],
cwd=widget_dir,
stdout=sys.stdout,
stderr=sys.stderr,
Expand Down Expand Up @@ -228,6 +228,7 @@ def load_requirejs_dependencies():
],
extras_require={"testing": ["pytest"]},
install_requires=[
'ipykernel>=5.1.2',
'ipywidgets>=7.0.0,<8',
'traitlets>=4.3.2',
'Jinja2>=2.10.1'
Expand Down

0 comments on commit bb15aa0

Please sign in to comment.