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

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. ]
  36. here = os.path.abspath(os.path.dirname(__file__))
  37. with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
  38. long_description = f.read()
  39. if __name__ == "__main__":
  40. setup(
  41. name=NAME,
  42. version=VERSION,
  43. license="MIT Licence",
  44. url="https://git.nju.edu.cn/learnware/learnware-market",
  45. packages=find_packages(),
  46. include_package_data=True,
  47. description=DESCRIPTION,
  48. long_description=long_description,
  49. long_description_content_type="text/markdown",
  50. python_requires=REQUIRES_PYTHON,
  51. install_requires=REQUIRED,
  52. classifiers=[
  53. "Intended Audience :: Science/Research",
  54. "Intended Audience :: Developers",
  55. "Programming Language :: Python",
  56. "Topic :: Software Development",
  57. "Topic :: Scientific/Engineering",
  58. "Operating System :: POSIX :: Linux",
  59. "Operating System :: Microsoft :: Windows",
  60. "Operating System :: MacOS",
  61. "Programming Language :: Python :: 3.6",
  62. "Programming Language :: Python :: 3.7",
  63. "Programming Language :: Python :: 3.8",
  64. ],
  65. )

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