File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
pyrasterframes/src/main/python Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ object PythonBuildPlugin extends AutoPlugin {
114114 val wd = copyPySources.value
115115 val args = spaceDelimited(" <args>" ).parsed
116116 val cmd = Seq (pythonCommand.value, " setup.py" ) ++ args
117- val ver = version.value
117+ val ver = ( Python / version) .value
118118 s.log.info(s " Running ' ${cmd.mkString(" " )}' in ' $wd' " )
119119 val ec = Process (cmd, wd, " RASTERFRAMES_VERSION" -> ver).!
120120 if (ec != 0 )
Original file line number Diff line number Diff line change 2020
2121# Always prefer setuptools over distutils
2222from setuptools import setup
23- from os import path
23+ from os import path , environ , mkdir
2424import sys
2525from glob import glob
2626from io import open
2727import distutils .cmd
2828
2929try :
30+ enver = environ .get ('RASTERFRAMES_VERSION' )
31+ if enver is not None :
32+ open ('pyrasterframes/version.py' , mode = "w" ).write (f"__version__: str = '{ enver } '\n " )
3033 exec (open ('pyrasterframes/version.py' ).read ()) # executable python script contains __version__; credit pyspark
31- except IOError :
32- print ("Run setup via `sbt 'pySetup arg1 arg2'` to ensure correct access to all source files and binaries." )
34+ except IOError as e :
35+ print (e )
36+ print ("Try running setup via `sbt 'pySetup arg1 arg2'` to ensure correct access to all source files and binaries." )
3337 sys .exit (- 1 )
3438
35-
3639VERSION = __version__
3740
3841here = path .abspath (path .dirname (__file__ ))
You can’t perform that action at this time.
0 commit comments