You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

setup.py 2.5 kB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. import os
  2. from setuptools import find_packages, setup
  3. def read(rel_path: str) -> str:
  4. here = os.path.abspath(os.path.dirname(__file__))
  5. with open(os.path.join(here, rel_path), encoding="utf-8") as fp:
  6. return fp.read()
  7. def get_version(rel_path: str) -> str:
  8. for line in read(rel_path).splitlines():
  9. if line.startswith("__version__"):
  10. delim = '"' if '"' in line else "'"
  11. return line.split(delim)[1]
  12. raise RuntimeError("Unable to find version string.")
  13. # Package meta-data.
  14. NAME = "learnware"
  15. DESCRIPTION = "learnware market project"
  16. REQUIRES_PYTHON = ">=3.6.0"
  17. VERSION = get_version("learnware/__init__.py")
  18. # BEFORE importing setuptools, remove MANIFEST. Otherwise it may not be
  19. # properly updated when the contents of directories change (true for distutils,
  20. # not sure about setuptools).
  21. if os.path.exists("MANIFEST"):
  22. os.remove("MANIFEST")
  23. # What packages are required for this module to be executed?
  24. # `estimator` may depend on other packages. In order to reduce dependencies, it is not written here.
  25. REQUIRED = [
  26. "numpy>=1.12.0",
  27. "pandas>=0.25.1",
  28. "scipy>=1.0.0",
  29. "matplotlib>=3.1.3",
  30. "torch>=1.11.0",
  31. # "faiss-cpu>=1.7.1",
  32. # "mkl-service>=2.3.0",
  33. "cvxopt>=1.3.0",
  34. "tqdm>=4.65.0",
  35. "scikit-learn>=1.2.2",
  36. "joblib>=1.2.0",
  37. "pyyaml>=6.0",
  38. ]
  39. here = os.path.abspath(os.path.dirname(__file__))
  40. with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
  41. long_description = f.read()
  42. if __name__ == "__main__":
  43. setup(
  44. name=NAME,
  45. version=VERSION,
  46. license="MIT Licence",
  47. url="https://git.nju.edu.cn/learnware/learnware-market",
  48. packages=find_packages(),
  49. include_package_data=True,
  50. description=DESCRIPTION,
  51. long_description=long_description,
  52. long_description_content_type="text/markdown",
  53. python_requires=REQUIRES_PYTHON,
  54. install_requires=REQUIRED,
  55. classifiers=[
  56. "Intended Audience :: Science/Research",
  57. "Intended Audience :: Developers",
  58. "Programming Language :: Python",
  59. "Topic :: Software Development",
  60. "Topic :: Scientific/Engineering",
  61. "Operating System :: POSIX :: Linux",
  62. "Operating System :: Microsoft :: Windows",
  63. "Operating System :: MacOS",
  64. "Programming Language :: Python :: 3.6",
  65. "Programming Language :: Python :: 3.7",
  66. "Programming Language :: Python :: 3.8",
  67. ],
  68. )

基于学件范式,全流程地支持学件上传、检测、组织、查搜、部署和复用等功能。同时,该仓库作为北冥坞系统的引擎,支撑北冥坞系统的核心功能。