Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

setup.py 1.9 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
  1. # Copyright (c) 2022, NVIDIA CORPORATION.
  2. # SPDX-License-Identifier: Apache-2.0
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. import os
  15. import sys
  16. import re
  17. from setuptools import setup, find_packages
  18. import importlib.util
  19. package_dir = 'nemo_chem'
  20. spec = importlib.util.spec_from_file_location('package_info', os.path.join(package_dir, 'package_info.py'))
  21. package_info = importlib.util.module_from_spec(spec)
  22. spec.loader.exec_module(package_info)
  23. package_name = package_info.__package_name__
  24. if os.path.exists('README.rmd'):
  25. with open("README.md", "r") as fh:
  26. long_description = fh.read()
  27. long_description_content_type = "text/markdown"
  28. else:
  29. long_description = 'See ' + package_info.__homepage__
  30. long_description_content_type = 'text'
  31. ###
  32. setup(
  33. name=package_name,
  34. version=package_info.__version__,
  35. description=package_info.__description__,
  36. long_description=long_description,
  37. long_description_content_type=long_description_content_type,
  38. url=package_info.__repository_url__,
  39. download_url=package_info.__download_url__,
  40. author=package_info.__contact_names__,
  41. maintainer=package_info.__contact_names__,
  42. license=package_info.__license__,
  43. packages=find_packages(include=[package_dir, package_dir + '.*']),
  44. include_package_data=True,
  45. package_dir={package_name: package_dir},
  46. package_data={package_name: ['vocab/*']}
  47. )
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...