Skip to content

Commit 32b9259

Browse files
committed
Merge branch 'master' of github.com:xArm-Developer/xArm-Python-SDK into develop
2 parents 087eae4 + 536a9c7 commit 32b9259

File tree

2 files changed

+45
-2
lines changed

2 files changed

+45
-2
lines changed

.github/workflows/python-publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
push:
13+
tags:
14+
- 'v*'
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
deploy:
21+
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Set up Python
27+
uses: actions/setup-python@v3
28+
with:
29+
python-version: '3.x'
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install build
34+
- name: Build package
35+
run: python -m build
36+
- name: Publish package
37+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
38+
with:
39+
user: __token__
40+
password: ${{ secrets.PYPI_API_TOKEN }}

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ def find_packages(base_path='.'):
3939
# long_description = open('README.rst').read()
4040
long_description = 'long description for xArm-Python-SDK'
4141

42-
with open(os.path.join(os.getcwd(), 'requirements.txt')) as f:
43-
requirements = f.read().splitlines()
42+
try:
43+
with open(os.path.join(os.getcwd(), 'requirements.txt')) as f:
44+
requirements = f.read().splitlines()
45+
except:
46+
requirements = []
4447

4548
setup(
4649
name='xArm-Python-SDK',

0 commit comments

Comments
 (0)