Skip to content

Commit

Permalink
Merge pull request #14 from small-thinking/decouple-pypi-build
Browse files Browse the repository at this point in the history
Add local test package build script
  • Loading branch information
yxjiang authored Mar 11, 2024
2 parents 6174a9a + 71ca170 commit 2022e4f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions polymind/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .core.tool import BaseTool
from .core.message import Message
from .core.task import BaseTask, CompositeTask, SequentialTask
from .core.agent import Agent, ThoughtProcess
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name="polymind",
version="0.0.7",
version="0.0.8",
packages=find_packages(),
install_requires=requirements,
author="Small Thinking",
Expand Down
22 changes: 22 additions & 0 deletions tests/build_test_pypi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Exit in case of error
set -e

# Ensure the script is run from the project root directory
if [ ! -f "setup.py" ] && [ ! -f "pyproject.toml" ]; then
echo "Error: setup.py or pyproject.toml not found. Are you in the right directory?"
exit 1
fi

# Step 1: Build the package
echo "Building the package..."
python -m pip install --upgrade pip setuptools wheel twine
python setup.py sdist bdist_wheel

# Step 2: Upload the package to Test PyPI
# Make sure the password is in the .pypirc file
echo "Uploading the package to Test PyPI..."
twine upload --repository testpypi dist/*

echo "Package uploaded successfully."

0 comments on commit 2022e4f

Please sign in to comment.