File tree Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,25 @@ jobs:
231
231
path : artifacts/whl
232
232
compression-level : 0
233
233
234
+ setuptools :
235
+ name : Setuptools install
236
+ needs : pre-commit
237
+ runs-on : ubuntu-20.04
238
+ steps :
239
+ - name : Check out repo
240
+ uses : actions/checkout@v4
241
+ - name : Install dependencies
242
+ run : |
243
+ sudo apt-get update
244
+ sudo apt-get install -y libopenslide0 python3-pil
245
+ pip install pytest
246
+ - name : Install OpenSlide Python
247
+ run : sudo python setup.py install
248
+ - name : Run tests
249
+ run : pytest -v
250
+ - name : Tile slide
251
+ run : python examples/deepzoom/deepzoom_tile.py --viewer -o tiled tests/fixtures/small.svs
252
+
234
253
docs :
235
254
name : Docs
236
255
needs : pre-commit
Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ def _write_html(self) -> None:
335
335
# We're not running from a module (e.g. "python deepzoom_tile.py")
336
336
# so PackageLoader('__main__') doesn't work in jinja2 3.x.
337
337
# Load templates directly from the filesystem.
338
- loader = jinja2 .FileSystemLoader (Path (__file__ ).parent / 'templates' )
338
+ loader = jinja2 .FileSystemLoader ([ Path (__file__ ).parent / 'templates' ] )
339
339
env = jinja2 .Environment (loader = loader , autoescape = True )
340
340
template = env .get_template ('slide-multipane.html' )
341
341
associated_urls = {n : self ._url_for (n ) for n in self ._slide .associated_images }
Original file line number Diff line number Diff line change
1
+ from pathlib import Path
1
2
import sys
2
3
3
4
from setuptools import Extension , setup
4
5
6
+ # Load version string
7
+ with open (Path (__file__ ).parent / 'openslide/_version.py' ) as _fh :
8
+ exec (_fh .read ()) # instantiates __version__
9
+
5
10
# use the Limited API on Python 3.11+; build release-specific wheels on
6
11
# older Python
7
12
_abi3 = sys .version_info >= (3 , 11 )
21
26
# tag wheel for Limited API
22
27
'bdist_wheel' : {'py_limited_api' : 'cp311' } if _abi3 else {},
23
28
},
29
+ #
30
+ # setuptools < 61 compatibility for distro packages building from source
31
+ name = 'openslide-python' ,
32
+ version = __version__ , # type: ignore[name-defined] # noqa: F821
33
+ install_requires = [
34
+ 'Pillow' ,
35
+ ],
36
+ packages = [
37
+ 'openslide' ,
38
+ ],
39
+ package_data = {
40
+ 'openslide' : ['py.typed' , '*.pyi' ],
41
+ },
42
+ zip_safe = False ,
24
43
)
You can’t perform that action at this time.
0 commit comments