diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..f30e67e3e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,69 @@ +[build-system] +requires = ["setuptools~=70.0.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "bittensor-cli" +version = "9.1.1" +description = "Bittensor CLI" +readme = "README.md" +authors = [ + {name = "bittensor.com"} +] +license = { file = "LICENSE" } +scripts = { btcli = "bittensor_cli.cli:main" } +requires-python = ">=3.9,<3.13" +dependencies = [ + "wheel", + "async-property==0.2.2", + "async-substrate-interface>=1.0.4", + "aiohttp~=3.10.2", + "backoff~=2.2.1", + "GitPython>=3.0.0", + "fuzzywuzzy~=0.18.0", + "netaddr~=1.3.0", + "numpy>=2.0.1", + "Jinja2", + "pycryptodome>=3.0.0,<4.0.0", + "PyYAML~=6.0.1", + "pytest", + "python-Levenshtein", + "rich~=13.7", + "scalecodec==1.2.11", + "typer~=0.12", + "websockets>=14.1", + "bittensor-wallet>=3.0.4", + "plotille>=5.0.0", + "pywry>=0.6.2", + "plotly>=6.0.0", +] + +[project.optional-dependencies] +cuda = [ + "torch>=1.13.1,<2.6.0", + "cubit>=1.1.0" +] + +[project.urls] +# more details can be found here +homepage = "https://github.com/opentensor/btcli" +Repository = "https://github.com/opentensor/btcli" + +[tool.flit.metadata] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: End Users/Desktop", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Mathematics", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Utilities" +] + +[tool.setuptools] +package-dir = {"bittensor_cli" = "bittensor_cli"} \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 45bfc0fa4..000000000 --- a/setup.py +++ /dev/null @@ -1,102 +0,0 @@ -# The MIT License (MIT) -# Copyright © 2024 Opentensor Foundation -# -# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -# documentation files (the “Software”), to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, -# and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all copies or substantial portions of -# the Software. -# -# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO -# THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -from setuptools import setup, find_packages -from os import path -from io import open -import codecs -import re -import os -import pathlib - - -def read_requirements(path): - requirements = [] - - with pathlib.Path(path).open() as requirements_txt: - for line in requirements_txt: - if line.startswith("git+"): - pkg_name = re.search(r"egg=([a-zA-Z0-9_-]+)", line.strip()).group(1) - requirements.append(pkg_name + " @ " + line.strip()) - else: - requirements.append(line.strip()) - - return requirements - - -requirements = read_requirements("requirements.txt") -cuda_requirements = read_requirements("cuda_requirements.txt") - -here = path.abspath(path.dirname(__file__)) - -with open(path.join(here, "README.md"), encoding="utf-8") as f: - long_description = f.read() - - -# loading version from setup.py -with codecs.open( - os.path.join(here, "bittensor_cli/version.py"), encoding="utf-8" -) as init_file: - version_match = re.search( - r"^__version__ = ['\"]([^'\"]*)['\"]", init_file.read(), re.M - ) - version_string = version_match.group(1) - -setup( - name="bittensor-cli", - version=version_string, - description="Bittensor CLI", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/opentensor/btcli", - author="bittensor.com", - packages=find_packages(exclude=["tests", "tests.*", "*/tests/*", "*/tests"]) - + ["bittensor_cli.src.bittensor.templates"], - include_package_data=True, - package_data={ - "": ["templates/*"], - }, - author_email="", - license="MIT", - python_requires=">=3.9", - install_requires=requirements, - extras_require={ - "cuda": cuda_requirements, - }, - entry_points={ - "console_scripts": [ - "btcli=bittensor_cli.cli:main", - ], - }, - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Topic :: Software Development :: Build Tools", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Topic :: Scientific/Engineering", - "Topic :: Scientific/Engineering :: Mathematics", - "Topic :: Scientific/Engineering :: Artificial Intelligence", - "Topic :: Software Development", - "Topic :: Software Development :: Libraries", - "Topic :: Software Development :: Libraries :: Python Modules", - ], -)