mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-10-06 09:58:11 +08:00
move version string into module
This commit is contained in:
@@ -6,3 +6,5 @@
|
|||||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
|
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
|
||||||
# OR CONDITIONS OF ANY KIND, either express or implied. See the License for
|
# OR CONDITIONS OF ANY KIND, either express or implied. See the License for
|
||||||
# the specific language governing permissions and limitations under the License.
|
# the specific language governing permissions and limitations under the License.
|
||||||
|
|
||||||
|
__version__ = "0.2.0"
|
||||||
|
|||||||
@@ -1,5 +1,23 @@
|
|||||||
import os
|
import os
|
||||||
from setuptools import setup
|
import codecs
|
||||||
|
from setuptools import find_packages, setup
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if sys.version_info < (3,6):
|
||||||
|
sys.exit('Sorry, Python < 3.6 is not supported')
|
||||||
|
|
||||||
|
def read(rel_path):
|
||||||
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
|
||||||
|
return fp.read()
|
||||||
|
|
||||||
|
def get_version(rel_path):
|
||||||
|
for line in read(rel_path).splitlines():
|
||||||
|
if line.startswith('__version__'):
|
||||||
|
delim = '"' if '"' in line else "'"
|
||||||
|
return line.split(delim)[1]
|
||||||
|
else:
|
||||||
|
raise RuntimeError("Unable to find version string.")
|
||||||
|
|
||||||
def parse_requirements():
|
def parse_requirements():
|
||||||
reqs = []
|
reqs = []
|
||||||
@@ -17,7 +35,7 @@ setup(
|
|||||||
# mandatory
|
# mandatory
|
||||||
name="cellxgene-gateway",
|
name="cellxgene-gateway",
|
||||||
# mandatory
|
# mandatory
|
||||||
version="0.2.0",
|
version=get_version("cellxgene_gateway/__init__.py"),
|
||||||
# mandatory
|
# mandatory
|
||||||
author="Niket Patel, Yohann Potier, Alok Saldanha",
|
author="Niket Patel, Yohann Potier, Alok Saldanha",
|
||||||
author_email="alok.saldanha@novartis.com",
|
author_email="alok.saldanha@novartis.com",
|
||||||
|
|||||||
Reference in New Issue
Block a user