Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,7 @@ cython_debug/
.dmypy.json
dmypy.json
.pyre/
.pytype/
.pytype/

# uv
uv.lock
63 changes: 58 additions & 5 deletions pyagentspec/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,63 @@
[project]
name = "pyagentspec"
dynamic = ["version"]
description = "Package defining the PyAgentSpec library for Agents and LLM fixed-flows abstractions."
license = {text = "Apache-2.0 OR UPL-1.0"}
readme = "README.md"
authors = [
{name = "Oracle"},
]
classifiers = [
"Development Status :: 3 - Alpha",
"Natural Language :: English",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Libraries :: Python Modules",
]
keywords = ["NLP", "text generation", "code generation", "LLM", "Assistant", "Tool", "Agent"]
requires-python = ">=3.10"
dependencies = [
"jsonschema>=4.23.0,<5",
"pydantic>=2.10,<2.13",
"pyyaml>=6,<7",
"httpx>0.28.0",
]

[project.optional-dependencies]
full = ["pyagentspec[crewai, autogen, langgraph]"]
crewai = [
"crewai[litellm]>=1.6.1; python_version < '3.14'",
"litellm>=1.79.0; python_version < '3.14'",
]
autogen = [
"autogen-core>=0.5.6; python_version < '3.13'",
"autogen-ext[ollama,openai]>=0.5.6; python_version < '3.13'",
"autogen-agentchat>=0.5.6; python_version < '3.13'",
]
langgraph = [
"langgraph>=0.5.3",
"langchain-core>=0.3",
"langchain-openai>=0.3.7",
"langchain-ollama>=0.3.3",
]

[dependency-groups]
dev = [
"pyagentspec[full]",
]

[build-system]
requires = [
"setuptools<72.0.0",
"wheel",
# setuptools-scm lets us include all necessary files (e.g. .pyx files) in the source
# distribution (sdist) without needing a MANIFEST.in file.
"setuptools-scm == 7.1.0",
"setuptools<72.0.0",
"wheel",
# setuptools-scm lets us include all necessary files (e.g. .pyx files) in the source
# distribution (sdist) without needing a MANIFEST.in file.
"setuptools-scm==7.1.0",
]
build-backend = "setuptools.build_meta"

Expand Down
74 changes: 5 additions & 69 deletions pyagentspec/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,79 +4,15 @@
# (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) or Universal Permissive License
# (UPL) 1.0 (LICENSE-UPL or https://oss.oracle.com/licenses/upl), at your option.

import io
import os.path
import os
from pathlib import Path

from setuptools import find_packages, setup
from setuptools import setup

NAME = "pyagentspec"

# Check for an environment variable to override the version
VERSION = os.environ.get("BUILD_VERSION")
if not VERSION:
with open("../VERSION") as version_file:
VERSION = version_file.read().strip()


def read(file_name):
"""Read a text file and return the content as a string."""
file_path = os.path.join(os.path.dirname(__file__), file_name)
with io.open(file_path, encoding="utf-8") as f:
return f.read()

if VERSION is None:
VERSION = Path("../VERSION").read_text().strip()

setup(
name=NAME,
version=VERSION,
description="Package defining the PyAgentSpec library for Agents and LLM fixed-flows abstractions.",
license="Apache-2.0 OR UPL-1.0",
long_description=read("README.md"),
long_description_content_type="text/markdown",
url="",
author="Oracle",
author_email="",
classifiers=[
"Development Status :: 3 - Alpha",
"Natural Language :: English",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords="NLP, text generation,code generation, LLM, Assistant, Tool, Agent",
package_dir={"": "src"},
packages=find_packages("src"),
python_requires=">=3.10",
install_requires=[
"jsonschema>=4.23.0,<5",
"pydantic>=2.10,<2.13",
"pyyaml>=6,<7",
"httpx>0.28.0",
],
test_suite="tests",
entry_points={
"console_scripts": [],
},
include_package_data=True,
extras_require={
"crewai": [
"crewai[litellm]>=1.6.1; python_version < '3.14'",
"litellm>=1.79.0; python_version < '3.14'",
],
"autogen": [
"autogen-core>=0.5.6; python_version < '3.13'",
"autogen-ext[ollama,openai]>=0.5.6; python_version < '3.13'",
"autogen-agentchat>=0.5.6; python_version < '3.13'",
],
"langgraph": [
"langgraph>=0.5.3",
"langchain-core>=0.3",
"langchain-openai>=0.3.7",
"langchain-ollama>=0.3.3",
],
},
)
4 changes: 2 additions & 2 deletions pyagentspec/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import os
import stat
from contextlib import contextmanager
from distutils.sysconfig import get_python_lib
from pathlib import Path
from sysconfig import get_path
from typing import Any, Iterator, List, Union
from unittest.mock import patch

Expand Down Expand Up @@ -134,7 +134,7 @@ def check_file_permissions(path: Any) -> None:

def get_directory_allowlist_write(tmp_path: str) -> List[Union[str, Path]]:
return [
get_python_lib(), # Allow packages to r/w their pycache
get_path("platlib"), # Allow packages to r/w their pycache
tmp_path,
"/dev/null",
]
Expand Down