dn-scribe commited on
Commit
22a2ec5
·
unverified ·
1 Parent(s): 094deb1

fix: fix setup to enable local re-install

Browse files
Files changed (1) hide show
  1. setup.py +12 -1
setup.py CHANGED
@@ -1,11 +1,22 @@
1
  from setuptools import setup, find_packages
2
  from pathlib import Path
3
- from scribe_python_client.version import __version__
4
 
5
  # Read the README file
6
  this_directory = Path(__file__).parent
7
  long_description = (this_directory / "README.md").read_text()
8
 
 
 
 
 
 
 
 
 
 
 
 
9
  setup(
10
  name='scribe-python-client',
11
  version=__version__,
 
1
  from setuptools import setup, find_packages
2
  from pathlib import Path
3
+
4
 
5
  # Read the README file
6
  this_directory = Path(__file__).parent
7
  long_description = (this_directory / "README.md").read_text()
8
 
9
+ def read_version():
10
+ version_path = Path(__file__).parent / "scribe_python_client" / "version.py"
11
+ with open(version_path) as f:
12
+ for line in f:
13
+ if line.startswith("__version__"):
14
+ delim = '"' if '"' in line else "'"
15
+ return line.split(delim)[1]
16
+ raise RuntimeError("Unable to find version string.")
17
+
18
+ __version__ = read_version()
19
+
20
  setup(
21
  name='scribe-python-client',
22
  version=__version__,