Skip to content

Commit eac2b74

Browse files
authored
Add Desktop Shortcut for RobotLab (#14)
* bump all the version * fix the shasums * always with the crazy exit codes * update license * more license * let's try these icons * add more vars * more tests * har, gonna need pyshotcuts to make shortcuts * this might not be good * try some more shortcuts * cleaning * some recipe fixes * use prefix in post-install * fix paths * fix extension * try activating * more work on (testing) shortcuts * don't need these custom locations anymore * fix env for win tests * fix some path stuff * fix osx env on install
1 parent 4c7c623 commit eac2b74

25 files changed

+554
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ build/
88
constructor/construct.yaml
99
dist/
1010
envs/
11+
**/icons/*.png

anaconda-project.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,47 @@ commands:
2323

2424
test:win:
2525
windows: python -m scripts.test
26-
env_spec: _build_win
26+
env_spec: _test_win
2727

2828
combine:
2929
unix: python -m scripts.combine
3030
env_spec: _build
3131

32-
lab:setup:
32+
robotlab:setup:
3333
env_spec: robotlab-dev
3434
unix: cd robotlab && python -m pip install -e . --ignore-installed --no-deps --no-cache-dir -vv
3535
windows: cd robotlab && python -m pip install -e . --ignore-installed --no-deps --no-cache-dir -vv
3636

37+
robotlab:setup:win:
38+
env_spec: robotlab-dev-win
39+
windows: cd robotlab && python -m pip install -e . --ignore-installed --no-deps --no-cache-dir -vv
40+
41+
robotlab:shortcuts:
42+
env_spec: robotlab-dev
43+
unix: robotlab-shortcuts
44+
45+
robotlab:launch:
46+
env_spec: robotlab-dev
47+
unix: python -m robotlab.launch
48+
49+
robotlab:launch:win:
50+
env_spec: robotlab-dev-win
51+
windows: python -m robotlab.launch
52+
3753
robotlab:build:
3854
env_spec: robotlab-dev
3955
unix: robotlab build
56+
57+
robotlab:build:win:
58+
env_spec: robotlab-dev-win
4059
windows: robotlab build
4160

4261
robotlab:
4362
env_spec: robotlab-dev
4463
unix: robotlab
64+
65+
robotlab:win:
66+
env_spec: robotlab-dev-win
4567
windows: robotlab
4668

4769
env_specs:
@@ -95,8 +117,16 @@ env_specs:
95117
packages:
96118
- jupyterlab >=0.35,<0.36
97119
- nodejs >=8,<9
98-
- robotkernel
120+
- pyshortcuts
99121
- python >=3.6,<3.7
122+
- restinstance
123+
- robotframework-seleniumscreenshots
124+
- robotkernel
125+
126+
robotlab-dev-win:
127+
inherit_from:
128+
- robotlab-dev
129+
100130

101131
robotlab-test:
102132
inherit_from:

ci/steps.common.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ steps:
77

88
- script: >
99
python -m scripts.build conda
10+
pyshortcuts
1011
jsonpointer
1112
rfc3987
1213
jsonpath-ng
@@ -31,6 +32,10 @@ steps:
3132
- script: python -m scripts.test
3233
displayName: Test
3334

35+
- ${{ if eq(parameters.name, 'MacOSX') }}:
36+
- script: chmod -R 777 _artifacts
37+
displayName: Fix artifact permissions
38+
3439
- task: PublishTestResults@2
3540
displayName: Publish Test Results
3641
inputs:

constructor/construct.yaml.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: RobotLab
22
version: {{ version }}
3+
company: Robots from Jupyter
34

45
channels:
56
- {{ build_channel }}
@@ -14,6 +15,7 @@ specs:
1415
- jupyterlab
1516
- nodejs >={{ node_min }},<{{ node_max }}
1617
- opencv
18+
- pyshortcuts
1719
- python >={{ py_min }},<{{ py_max }}
1820
- python-chromedriver-binary =={{ cd_version }}
1921
- restinstance
@@ -26,3 +28,5 @@ specs:
2628
- robotlab =={{ version }}
2729

2830
install_in_dependency_order: True
31+
32+
post_install: post_install.{{ script_ext }}

constructor/post_install.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"%PREFIX%\Scripts\activate.bat" "%PREFIX%"
2+
robotlab-shortcuts

constructor/post_install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
. "${PREFIX}/bin/activate"
3+
robotlab-shortcuts

recipes/pyshortcuts/meta.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{% set name = "pyshortcuts" %}
2+
{% set version = "1.3" %}
3+
4+
package:
5+
name: {{ name }}
6+
version: {{ version }}
7+
8+
source:
9+
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
10+
sha256: 505307516626a9be1e9a23565e53564fcf11374e13a677bfcec94a255be0c4e1
11+
12+
build:
13+
number: 0
14+
script:
15+
- {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vvv
16+
entry_points:
17+
- pyshortcut = pyshortcuts:shortcut_cli
18+
19+
requirements:
20+
host:
21+
- pip
22+
- python
23+
run:
24+
- six
25+
- python
26+
- pywin32 # [win]
27+
28+
test:
29+
requires:
30+
- wxpython
31+
imports:
32+
- pyshortcuts
33+
- pyshortcuts.darwin
34+
- pyshortcuts.linux
35+
- pyshortcuts.windows
36+
- pyshortcuts.wxgui
37+
38+
commands:
39+
- pyshortcut --help
40+
41+
42+
about:
43+
home: https://github.com/newville/pyshortcuts
44+
license: MIT
45+
license_file: LICENSE
46+
summary: create desktop shortcuts to python scripts on Windows, Mac, or Linux

recipes/robotlab/meta.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,25 @@ requirements:
5353
- ipywidgets
5454
- jupyterlab >={{ lab_min }},<{{ lab_max }}
5555
- nodejs >=8,<9
56+
- pyshortcuts
5657
- python
5758
- robotkernel >={{ version }}
5859

5960
test:
61+
imports:
62+
- robotlab
63+
- robotlab.launch
64+
- robotlab.examples
65+
- robotlab.labextensionapp
66+
- robotlab.shortcuts
67+
- robotlab.tutorial
6068
commands:
6169
- robotlab --version
6270
- robotlab-extension list
6371
- robotlab-examples
6472
- robotlab-tutorial
73+
- mkdir Desktop # [unix]
74+
- HOME=$(pwd) robotlab-shortcuts # [unix]
6575

6676
about:
6777
home: https://github.com/robots-from-jupyter/robotlab

robotlab/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
include README.md LICENSE
2+
recursive-include src/robotlab/icons *.ico *.icns

robotlab/setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ classifiers =
3030
console_scripts =
3131
robotlab = robotlab.labapp:main
3232
robotlab-extension = robotlab.labextensionapp:main
33+
robotlab-shortcuts = robotlab.shortcuts:make_shortcuts
3334
robotlab-examples = robotlab.examples:copy_robotkernel_examples
3435
robotlab-tutorial = robotlab.tutorial:copy_robotkernel_tutorial
3536

0 commit comments

Comments
 (0)