tezuesh commited on
Commit
8bb8c17
·
verified ·
1 Parent(s): ffffaa4

Update setup.py

Browse files
Files changed (1) hide show
  1. setup.py +15 -31
setup.py CHANGED
@@ -1,21 +1,3 @@
1
- # The MIT License (MIT)
2
- # Copyright © 2023 Yuma Rao
3
- # Copyright © 2024 Omega Labs, Inc.
4
-
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
6
- # documentation files (the “Software”), to deal in the Software without restriction, including without limitation
7
- # the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
8
- # and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9
-
10
- # The above copyright notice and this permission notice shall be included in all copies or substantial portions of
11
- # the Software.
12
-
13
- # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
14
- # THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15
- # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
16
- # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
17
- # DEALINGS IN THE SOFTWARE.
18
-
19
  import re
20
  import os
21
  import codecs
@@ -23,32 +5,34 @@ from os import path
23
  from io import open
24
  from setuptools import setup, find_packages
25
 
26
-
27
  def read_requirements(path):
28
  with open(path, "r") as f:
29
  requirements = f.read().splitlines()
30
  return requirements
31
 
32
-
33
  requirements = read_requirements("requirements.txt")
34
  here = path.abspath(path.dirname(__file__))
35
 
36
  with open(path.join(here, "README.md"), encoding="utf-8") as f:
37
  long_description = f.read()
38
 
39
- # loading version from setup.py
40
- with codecs.open(
41
- os.path.join(here, "template/__init__.py"), encoding="utf-8"
42
- ) as init_file:
43
- version_match = re.search(
44
- r"^__version__ = ['\"]([^'\"]*)['\"]", init_file.read(), re.M
45
- )
46
- version_string = version_match.group(1)
 
 
 
 
47
 
48
  setup(
49
- name="omegalabs-anytoany-bittensor",
50
  version=version_string,
51
- description="omegalabs-anytoany-bittensor",
52
  long_description=long_description,
53
  long_description_content_type="text/markdown",
54
  url="https://github.com/omegalabsinc/omegalabs-anytoany-bittensor",
@@ -75,4 +59,4 @@ setup(
75
  "Topic :: Software Development :: Libraries",
76
  "Topic :: Software Development :: Libraries :: Python Modules",
77
  ],
78
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import re
2
  import os
3
  import codecs
 
5
  from io import open
6
  from setuptools import setup, find_packages
7
 
 
8
  def read_requirements(path):
9
  with open(path, "r") as f:
10
  requirements = f.read().splitlines()
11
  return requirements
12
 
 
13
  requirements = read_requirements("requirements.txt")
14
  here = path.abspath(path.dirname(__file__))
15
 
16
  with open(path.join(here, "README.md"), encoding="utf-8") as f:
17
  long_description = f.read()
18
 
19
+ # Default version if __init__.py not found
20
+ version_string = "0.1.0"
21
+
22
+ # Try to load version from __init__.py if it exists
23
+ init_file_path = os.path.join(here, "template/__init__.py")
24
+ if os.path.exists(init_file_path):
25
+ with codecs.open(init_file_path, encoding="utf-8") as init_file:
26
+ version_match = re.search(
27
+ r"^__version__ = ['\"]([^'\"]*)['\"]", init_file.read(), re.M
28
+ )
29
+ if version_match:
30
+ version_string = version_match.group(1)
31
 
32
  setup(
33
+ name="moshi-hf",
34
  version=version_string,
35
+ description="Moshi HuggingFace inference server",
36
  long_description=long_description,
37
  long_description_content_type="text/markdown",
38
  url="https://github.com/omegalabsinc/omegalabs-anytoany-bittensor",
 
59
  "Topic :: Software Development :: Libraries",
60
  "Topic :: Software Development :: Libraries :: Python Modules",
61
  ],
62
+ )