File tree 4 files changed +12
-40
lines changed
4 files changed +12
-40
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ install_requires =
24
24
xarray
25
25
packages = find:
26
26
python_requires = >=3.7
27
+ setup_requires = setuptools_scm
27
28
zip_safe = False
28
29
29
30
[options.entry_points]
Original file line number Diff line number Diff line change 2
2
import shutil
3
3
import sys
4
4
5
- import param
6
5
import pyct .build
7
6
from setuptools import setup
8
7
9
- version = param .version .get_setup_version (
10
- __file__ ,
11
- 'xarray-spatial' ,
12
- pkgname = 'xrspatial' ,
13
- archive_commit = "$Format:%h$" ,
14
- )
15
-
16
- if 'sdist' in sys .argv and 'bdist_wheel' in sys .argv :
17
- try :
18
- version_test = version .split ('.post' )[1 ]
19
- version = version .split ('.post' )[0 ]
20
- except IndexError :
21
- version = version .split ('+' )[0 ]
22
- if version is None :
23
- sys .exit ('invalid version' )
24
-
25
8
26
9
if __name__ == '__main__' :
27
10
example_path = os .path .join (os .path .dirname (os .path .abspath (__file__ )),
28
11
'xrspatial' , 'examples' )
29
12
if 'develop' not in sys .argv :
30
13
pyct .build .examples (example_path , __file__ , force = True )
31
- setup (version = version )
14
+
15
+ use_scm = {
16
+ "write_to" : "xrspatial/_version.py"
17
+ }
18
+
19
+ setup (use_scm_version = use_scm )
32
20
33
21
if os .path .isdir (example_path ):
34
22
shutil .rmtree (example_path )
Original file line number Diff line number Diff line change 1
- import param
2
-
3
1
from xrspatial .aspect import aspect # noqa
4
2
from xrspatial .bump import bump # noqa
5
3
from xrspatial .classify import binary # noqa
35
33
from xrspatial .zonal import stats as zonal_stats # noqa
36
34
from xrspatial .zonal import suggest_zonal_canvas as suggest_zonal_canvas # noqa
37
35
38
- __version__ = str (
39
- param .version .Version (
40
- fpath = __file__ ,
41
- archive_commit = '$Format:%h$' ,
42
- reponame = 'xrspatial' ,
43
- )
44
- )
36
+
37
+ try :
38
+ from ._version import version as __version__
39
+ except ImportError :
40
+ __version__ = "unknown"
45
41
46
42
47
43
def test ():
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments