mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2024-08-29 01:18:33 +03:00
Fix pypi build (#3548)
* Fix pypi build The package on pypi only included opendevin/* (the poetry default). It also needs to include agenthub/* * Bumped version so people will actually get it! * Fix package definition * Updated poetry lock file * Update package name to openhands-ai * Add py.typed to indicate that OpenHands has type annotations * Replace package name with openhands_ai * Fix tests to reflect new name --------- Co-authored-by: Graham Neubig <neubig@gmail.com>
This commit is contained in:
0
openhands/py.typed
Normal file
0
openhands/py.typed
Normal file
@@ -59,7 +59,7 @@ def _create_project_source_dist():
|
||||
# Fetch the correct version from pyproject.toml
|
||||
package_version = _get_package_version()
|
||||
tarball_path = os.path.join(
|
||||
project_root, 'dist', f'openhands-{package_version}.tar.gz'
|
||||
project_root, 'dist', f'openhands_ai-{package_version}.tar.gz'
|
||||
)
|
||||
if not os.path.exists(tarball_path):
|
||||
logger.error(f'Source distribution not found at {tarball_path}')
|
||||
|
||||
4112
poetry.lock
generated
4112
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
[tool.poetry]
|
||||
name = "openhands"
|
||||
name = "openhands-ai"
|
||||
version = "0.9.0"
|
||||
description = "OpenHands: Code Less, Make More"
|
||||
authors = ["OpenHands"]
|
||||
@@ -7,6 +7,10 @@ license = "MIT"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/All-Hands-AI/OpenHands"
|
||||
include = ["poetry.lock"]
|
||||
packages = [
|
||||
{ include = "agenthub/**/*" },
|
||||
{ include = "openhands/**/*" }
|
||||
]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.11"
|
||||
@@ -43,6 +47,11 @@ tree-sitter = "0.21.3"
|
||||
bashlex = "^0.18"
|
||||
pyjwt = "^2.9.0"
|
||||
dirhash = "*"
|
||||
python-docx = "*"
|
||||
PyPDF2 = "*"
|
||||
python-pptx = "*"
|
||||
pylatexenc = "*"
|
||||
tornado = "*"
|
||||
|
||||
[tool.poetry.group.llama-index.dependencies]
|
||||
llama-index = "*"
|
||||
@@ -66,10 +75,6 @@ pytest-asyncio = "*"
|
||||
pytest-forked = "*"
|
||||
flake8 = "*"
|
||||
openai = "*"
|
||||
python-docx = "*"
|
||||
PyPDF2 = "*"
|
||||
pylatexenc = "*"
|
||||
python-pptx = "*"
|
||||
opencv-python = "*"
|
||||
pandas = "*"
|
||||
reportlab = "*"
|
||||
@@ -77,15 +82,12 @@ reportlab = "*"
|
||||
[tool.coverage.run]
|
||||
concurrency = ["gevent"]
|
||||
|
||||
|
||||
[tool.poetry.group.runtime.dependencies]
|
||||
jupyterlab = "*"
|
||||
notebook = "*"
|
||||
jupyter_kernel_gateway = "*"
|
||||
flake8 = "*"
|
||||
python-docx = "*"
|
||||
PyPDF2 = "*"
|
||||
python-pptx = "*"
|
||||
pylatexenc = "*"
|
||||
opencv-python = "*"
|
||||
|
||||
|
||||
@@ -111,6 +113,7 @@ ignore = ["D1"]
|
||||
[tool.ruff.lint.pydocstyle]
|
||||
convention = "google"
|
||||
|
||||
|
||||
[tool.poetry.group.evaluation.dependencies]
|
||||
streamlit = "*"
|
||||
whatthepatch = "*"
|
||||
|
||||
@@ -36,6 +36,7 @@ def _check_source_code_in_dir(temp_dir):
|
||||
|
||||
# The source code should only include the `openhands` folder, but not the other folders
|
||||
assert set(os.listdir(code_dir)) == {
|
||||
'agenthub',
|
||||
'openhands',
|
||||
'pyproject.toml',
|
||||
'poetry.lock',
|
||||
@@ -51,7 +52,7 @@ def _check_source_code_in_dir(temp_dir):
|
||||
pyproject = toml.load(f)
|
||||
|
||||
_pyproject_version = pyproject['tool']['poetry']['version']
|
||||
assert _pyproject_version == version('openhands')
|
||||
assert _pyproject_version == version('openhands-ai')
|
||||
|
||||
|
||||
def test_put_source_code_to_dir(temp_dir):
|
||||
|
||||
Reference in New Issue
Block a user