Files
py-wikijs/setup.py
Claude 59cdf5ee01 refactor: Rename package from wikijs-python-sdk to py-wikijs and migrate to GitHub
Complete package renaming and platform migration:

Package Name Changes:
- Rename package from 'wikijs-python-sdk' to 'py-wikijs'
- Update setup.py package name
- Update pyproject.toml package name
- Users can now install with: pip install py-wikijs

URL Migration (Gitea → GitHub):
- Replace all Gitea URLs with GitHub URLs
- Update repository: github.com/l3ocho/py-wikijs
- Update issue tracker: github.com/l3ocho/py-wikijs/issues
- Update documentation links
- Fix URL path format (/src/branch/main/ → /blob/main/)

Documentation Updates:
- Update README.md badges (PyPI, GitHub)
- Update installation instructions (pip install py-wikijs)
- Update all doc references to new package name
- Update all examples with GitHub URLs
- Update DEPLOYMENT_READY.md with new package name
- Update deployment.md with new package name

Testing:
- Successfully built py_wikijs-0.1.0.tar.gz (138 KB)
- Successfully built py_wikijs-0.1.0-py3-none-any.whl (66 KB)
- Package installs correctly: pip install py-wikijs
- Imports work: from wikijs import WikiJSClient
- Package metadata correct (Home-page: github.com/l3ocho/py-wikijs)

Breaking Changes:
- Package name changed from wikijs-python-sdk to py-wikijs
- Repository migrated from Gitea to GitHub
- All URLs updated to GitHub

Users should now:
pip install py-wikijs  # Instead of wikijs-python-sdk

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 20:23:50 +00:00

91 lines
3.2 KiB
Python

#!/usr/bin/env python3
"""Setup script for Wiki.js Python SDK."""
from setuptools import setup, find_packages
import os
def read_version():
"""Read version from wikijs/version.py."""
version_file = os.path.join("wikijs", "version.py")
with open(version_file, "r", encoding="utf-8") as f:
for line in f:
if line.startswith("__version__"):
return line.split("=")[1].strip().strip('"').strip("'")
raise RuntimeError("Unable to find version string.")
def read_readme():
"""Read README.md for long description."""
with open("README.md", "r", encoding="utf-8") as f:
return f.read()
def read_requirements():
"""Read requirements.txt for dependencies."""
with open("requirements.txt", "r", encoding="utf-8") as f:
return [line.strip() for line in f if line.strip() and not line.startswith("#")]
def read_dev_requirements():
"""Read requirements-dev.txt for development dependencies."""
try:
with open("requirements-dev.txt", "r", encoding="utf-8") as f:
deps = []
for line in f:
line = line.strip()
if line and not line.startswith("#") and not line.startswith("-r"):
deps.append(line)
return deps
except FileNotFoundError:
return []
setup(
name="py-wikijs",
version=read_version(),
description="A professional Python SDK for Wiki.js API integration",
long_description=read_readme(),
long_description_content_type="text/markdown",
author="leomiranda",
author_email="lmiranda@hotserv.cloud",
url="https://github.com/l3ocho/py-wikijs",
project_urls={
"Bug Reports": "https://github.com/l3ocho/py-wikijs/issues",
"Source": "https://github.com/l3ocho/py-wikijs",
"Documentation": "https://github.com/l3ocho/py-wikijs/blob/main/docs",
"Compatibility": "https://github.com/l3ocho/py-wikijs/blob/main/docs/compatibility.md",
"Wiki.js": "https://js.wiki",
},
packages=find_packages(),
include_package_data=True,
package_data={
"wikijs": ["py.typed"],
},
install_requires=read_requirements(),
extras_require={
"dev": read_dev_requirements(),
"async": ["aiohttp>=3.8.0"],
"cli": ["click>=8.0.0", "rich>=12.0.0"],
"all": ["aiohttp>=3.8.0", "click>=8.0.0", "rich>=12.0.0"],
},
python_requires=">=3.8",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Documentation",
"Typing :: Typed",
],
keywords=["wiki", "wikijs", "wiki.js", "api", "sdk", "client", "http", "rest", "graphql", "wiki.js-2.x"],
zip_safe=False,
)