diff --git a/.github/actions/pkg-check/action.yml b/.github/actions/pkg-check/action.yml index 26ae8ddc88..bfd1602e69 100644 --- a/.github/actions/pkg-check/action.yml +++ b/.github/actions/pkg-check/action.yml @@ -5,6 +5,10 @@ inputs: pkg-name: description: package name inside lightning.* required: true + nb-dirs: + description: nb of packages in the wrap/distribution + required: false + default: "1" runs: using: "composite" @@ -54,7 +58,7 @@ runs: # list folders without ending .egg-info dirs = [d for d in glob.glob(os.path.join("*", "src", "*")) if not d.endswith(".egg-info")] print(dirs) - assert len(dirs) == 1 + assert len(dirs) == ${{ inputs.nb-dirs }} # cleaning shutil.rmtree(pathlib.Path(dirs[0]).parent.parent) shell: python diff --git a/.github/workflows/ci-pkg-install.yml b/.github/workflows/ci-pkg-install.yml index 6eedad2539..7a83cd46ec 100644 --- a/.github/workflows/ci-pkg-install.yml +++ b/.github/workflows/ci-pkg-install.yml @@ -49,9 +49,11 @@ jobs: path: pypi - run: ls -lh pypi/ + - run: python -c "print('NB_DIRS=' + str(2 if '${{ matrix.pkg }}' == 'pytorch' else 1))" >> $GITHUB_ENV - uses: ./.github/actions/pkg-check with: pkg-name: ${{ matrix.pkg }} + nb-dirs: ${{ env.NB_DIRS }} - uses: actions/upload-artifact@v3 with: diff --git a/src/pytorch_lightning/__setup__.py b/src/pytorch_lightning/__setup__.py index 8fd93c77ee..8085574a5d 100644 --- a/src/pytorch_lightning/__setup__.py +++ b/src/pytorch_lightning/__setup__.py @@ -53,6 +53,10 @@ def _adjust_manifest(**__: Any) -> None: lines += [ "recursive-exclude src *.md" + os.linesep, "recursive-exclude requirements *.txt" + os.linesep, + # TODO: remove after the first standalone Lite release + "recursive-include requirements/lite *.txt" + os.linesep, + # TODO: remove after the first standalone Lite release + "recursive-include src/lightning_lite *.md" + os.linesep, "recursive-include src/pytorch_lightning *.md" + os.linesep, "recursive-include requirements/pytorch *.txt" + os.linesep, "include src/pytorch_lightning/py.typed" + os.linesep, # marker file for PEP 561 @@ -78,7 +82,15 @@ def _setup_args(**__: Any) -> Dict[str, Any]: url=_about.__homepage__, download_url="https://github.com/Lightning-AI/lightning", license=_about.__license__, - packages=find_packages(where="src", include=["pytorch_lightning", "pytorch_lightning.*"]), + packages=find_packages( + where="src", + include=[ + "pytorch_lightning", + "pytorch_lightning.*", + "lightning_lite", # TODO: remove after the first standalone Lite release + "lightning_lite.*", # TODO: remove after the first standalone Lite release + ], + ), package_dir={"": "src"}, include_package_data=True, long_description=_long_description,