Skip to content

Commit ab7daf4

Browse files
authored
Merge pull request #11 from techman83/fix_install
Fix Setup
2 parents a67b217 + a8a978e commit ab7daf4

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

.github/workflows/release.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ jobs:
2020
uses: actions/setup-python@v2
2121
with:
2222
python-version: 3.8
23+
- name: Install OctoPrint
24+
run: pip install OctoPrint
25+
- name: Print Version
26+
run: python setup.py --version
2327
- name: Install test dependencies
24-
run: |
25-
pip install OctoPrint Mock.GPIO
26-
pip install .[test]
28+
run: pip install .[test]
2729
- name: Run pytest
2830
run: pytest -v
2931
- name: Build package

.github/workflows/test.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ jobs:
1515
uses: actions/setup-python@v2
1616
with:
1717
python-version: 3.8
18+
- name: Install OctoPrint
19+
run: pip install OctoPrint
20+
- name: Print Version
21+
run: python setup.py --version
1822
- name: Install test dependencies
19-
run: |
20-
pip install OctoPrint Mock.GPIO
21-
pip install .[test]
23+
run: pip install .[test]
2224
- name: Run pytest
2325
run: pytest -v

setup.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
# pylint: disable=invalid-name
33

44
from setuptools import setup
5-
from filament_scale_enhanced import __version__
5+
6+
version = {}
7+
with open("filament_scale_enhanced/fse_version.py") as fp:
8+
exec(fp.read(), version) # pylint: disable=exec-used
69

710
try:
811
import octoprint_setuptools
@@ -18,7 +21,7 @@
1821
plugin_identifier = "filament_scale"
1922
plugin_package = "filament_scale_enhanced"
2023
plugin_name = "Filament Scale Enhanced"
21-
plugin_version = __version__
24+
plugin_version = version['VERSION']
2225
plugin_description = ("Plugin for integrating a load cell into a filament "
2326
"holder.")
2427
plugin_author = "Victor Noordhoek / Leon Wright"
@@ -35,6 +38,7 @@
3538
'pytest-pylint',
3639
'pylint',
3740
'pytest-flake8',
41+
'Mock.GPIO'
3842
],
3943
'test': [
4044
'pytest',
@@ -43,6 +47,7 @@
4347
'pytest-pylint',
4448
'pylint',
4549
'pytest-flake8',
50+
'Mock.GPIO'
4651
]
4752
}
4853

0 commit comments

Comments
 (0)