Skip to content

Commit 65ba5a7

Browse files
Bordabhimrazy
andauthored
fixing package & releasing (#529)
* fixing package & releasing * PR * ubuntu-22.04 * setup --------- Co-authored-by: Bhimraj Yadav <bhimrajyadav977@gmail.com>
1 parent 4e8335f commit 65ba5a7

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

.github/workflows/release-pypi.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,35 @@ name: PyPI Release
44
on: # Trigger the workflow on push or pull request, but only for the main branch
55
push:
66
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
paths:
10+
- ".github/workflows/release-pypi.yml"
711
release:
812
types: [published]
913

1014
# based on https://github.com/pypa/gh-action-pypi-publish
1115

1216
jobs:
1317
build:
14-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-22.04
1519

1620
steps:
1721
- uses: actions/checkout@v4
1822
- uses: actions/setup-python@v5
1923
with:
20-
python-version: 3.9
24+
python-version: "3.10"
2125

2226
- name: Install dependencies
23-
run: pip install -U build twine
27+
run: |
28+
pip install -U -q build twine
29+
pip list
2430
2531
- name: Build package
2632
run: python -m build
2733

2834
- name: Check package
29-
run: twine check dist/*
35+
run: twine check dist/* --strict
3036

3137
# We do this, since failures on test.pypi aren't that bad
3238
# - name: Publish to Test PyPI
@@ -39,7 +45,7 @@ jobs:
3945

4046
- name: Publish distribution 📦 to PyPI
4147
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
42-
uses: pypa/gh-action-pypi-publish@v1.10.0
48+
uses: pypa/gh-action-pypi-publish@v1.12.4
4349
with:
4450
user: __token__
4551
password: ${{ secrets.pypi_password }}

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ def _prepare_extras(requirements_dir: str = _PATH_REQUIRES, skip_files: tuple =
5959
author_email=about.__author_email__,
6060
url=about.__homepage__,
6161
download_url="https://github.com/Lightning-AI/litdata",
62-
license=about.__license__,
62+
license=about.__license__, # Should be a license identifier
63+
license_files=["LICENSE"], # Path to your license file
6364
long_description=readme,
6465
packages=find_packages(where="src"),
6566
package_dir={"": "src"},
@@ -87,7 +88,6 @@ def _prepare_extras(requirements_dir: str = _PATH_REQUIRES, skip_files: tuple =
8788
"Topic :: Scientific/Engineering :: Artificial Intelligence",
8889
"Topic :: Scientific/Engineering :: Information Analysis",
8990
# Pick your license as you wish
90-
"License :: OSI Approved :: Apache Software License",
9191
"Operating System :: OS Independent",
9292
# Specify the Python versions you support here. In particular, ensure
9393
# that you indicate whether you support Python 2, Python 3 or both.

0 commit comments

Comments
 (0)