Skip to content

Commit bb42f28

Browse files
committed
Add pyproject.toml fix step after SDK generation
1 parent dd8e6d6 commit bb42f28

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

.github/workflows/sync-and-publish.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,36 @@ jobs:
265265
266266
print('✅ Injected Mixpeek client wrapper')
267267
"
268-
268+
269+
- name: Fix pyproject.toml
270+
if: steps.check-pypi.outputs.exists != 'true'
271+
run: |
272+
echo "🔧 Fixing pyproject.toml..."
273+
python3 -c "
274+
import re
275+
with open('pyproject.toml', 'r') as f:
276+
content = f.read()
277+
278+
# Fix license format (NoLicense -> MIT)
279+
content = re.sub(r'license\s*=\s*\"NoLicense\"', 'license = \"MIT\"', content)
280+
281+
# Fix dependency format - remove parentheses
282+
content = re.sub(r'\"([^\"]+)\s+\(([^)]+)\)\"', r'\"\1\2\"', content)
283+
284+
# Fix repository URL
285+
content = re.sub(r'Repository\s*=\s*\"https://github.com/GIT_USER_ID/GIT_REPO_ID\"',
286+
'Repository = \"https://github.com/mixpeek/python-sdk\"', content)
287+
288+
# Add Homepage and Documentation if not present
289+
if 'Homepage' not in content:
290+
content = content.replace('[project.urls]', '[project.urls]\nHomepage = \"https://mixpeek.com\"\nDocumentation = \"https://docs.mixpeek.com\"')
291+
292+
with open('pyproject.toml', 'w') as f:
293+
f.write(content)
294+
295+
print('✅ Fixed pyproject.toml')
296+
"
297+
269298
- name: Build package
270299
if: steps.check-pypi.outputs.exists != 'true'
271300
run: python -m build

0 commit comments

Comments
 (0)