diff --git a/.github/workflows/ci-mf6.yml b/.github/workflows/ci-mf6.yml index 8df3c45ac2..cd08970a1f 100644 --- a/.github/workflows/ci-mf6.yml +++ b/.github/workflows/ci-mf6.yml @@ -47,7 +47,7 @@ jobs: pip install https://github.com/modflowpy/pymake/zipball/master pip install https://github.com/Deltares/xmipy/zipball/develop pip install https://github.com/MODFLOW-USGS/modflowapi/zipball/develop - pip install . --use-feature=in-tree-build + pip install . - name: Setup symbolic links on Linux run: | diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 32869ab277..b10bcbc70c 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -33,14 +33,13 @@ jobs: with: python-version: 3.9 - - name: Upgrade pip and install wheel + - name: Upgrade pip run: | python -m pip install --upgrade pip - pip install wheel - name: Base flopy installation run: | - pip install . --use-feature=in-tree-build + pip install . - name: Print flopy version run: | @@ -91,16 +90,15 @@ jobs: run: | conda env update --name flopy --file etc/environment.yml - - name: Upgrade pip and install wheel + - name: Upgrade pip run: | python -m pip install --upgrade pip - pip install wheel - name: Install pymake, xmipy, and flopy run: | pip install https://github.com/modflowpy/pymake/zipball/master pip install xmipy - pip install . --use-feature=in-tree-build + pip install . - name: Prepare for the autotests working-directory: ./autotest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f61aed5ee..7f10c6cf81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,19 +34,23 @@ jobs: with: python-version: 3.9 - - name: Upgrade pip and install wheel + - name: Upgrade pip and install build and twine run: | python -m pip install --upgrade pip - pip install wheel + pip install build twine - name: Base flopy installation run: | - pip install . --use-feature=in-tree-build + pip install . - name: Print flopy version run: | python -c "import flopy; print(flopy.__version__)" + - name: Build flopy packages, check dist outputs + run: | + python -m build + twine check --strict dist/* flopy_lint: name: linting @@ -138,10 +142,9 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Upgrade pip and install wheel + - name: Upgrade pip run: | python -m pip install --upgrade pip - pip install wheel - name: Install Python packages on Linux and MacOS run: | @@ -156,7 +159,7 @@ jobs: run: | pip install https://github.com/modflowpy/pymake/zipball/master pip install xmipy - pip install . --use-feature=in-tree-build + pip install . - name: Prepare for the autotests working-directory: ./autotest diff --git a/MANIFEST.in b/MANIFEST.in index cb0ebf7e40..4286f4561a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,3 @@ +include pyproject.toml include flopy/mf6/data/dfn/*.dfn -include flopy/plot/mplstyle/*.mplstyle \ No newline at end of file +include flopy/plot/mplstyle/*.mplstyle diff --git a/docs/PyPi_release.md b/docs/PyPI_release.md similarity index 100% rename from docs/PyPi_release.md rename to docs/PyPI_release.md diff --git a/docs/make_release.md b/docs/make_release.md index 3c43c7d878..8c915e5998 100644 --- a/docs/make_release.md +++ b/docs/make_release.md @@ -123,32 +123,26 @@ Use `run_notebooks.py` in the `release` directory to rerun all of the notebooks 6. Make pull request to [flopy-feedstock](https://github.com/conda-forge/flopy-feedstock) -## Update PyPi +## Update PyPI -1. Make sure `twine` is installed using: +1. Make sure the latest `build` and `twine` tools are installed using: ``` - conda search twine + pip install --upgrade build twine ``` - -2. If it is not installed, install using using: - - - ``` - conda install twine - ``` - -3. Create the source zip file in a terminal using: +2. Create the source and wheel packages with: ``` - python setup.py sdist + rm -rf dist + python -m build ``` -4. Upload the release to PyPi using (*make sure* `twine` *is installed using conda*): +3. Check and upload the release to PyPI using: ``` - twine upload dist/flopy-version.zip + twine check --strict dist/* + twine upload dist/* ``` ## Sync develop and master branches diff --git a/release/make-release.py b/release/make-release.py index d337730ddd..3fc3d6b35d 100644 --- a/release/make-release.py +++ b/release/make-release.py @@ -12,7 +12,7 @@ file_paths = { "version.py": "../flopy", "README.md": "../", - "PyPi_release.md": "../docs", + "PyPI_release.md": "../docs", "code.json": "../", "DISCLAIMER.md": "../flopy", "notebook_examples.md": "../docs", @@ -215,8 +215,8 @@ def update_version(): # update code.json update_codejson(vmajor, vminor, vmicro) - # update PyPi_release.md - update_PyPi_release(vmajor, vminor, vmicro) + # update PyPI_release.md + update_PyPI_release(vmajor, vminor, vmicro) def update_codejson(vmajor, vminor, vmicro): @@ -360,7 +360,7 @@ def update_notebook_examples_markdown(): f.close() -def update_PyPi_release(vmajor, vminor, vmicro): +def update_PyPI_release(vmajor, vminor, vmicro): # create disclaimer text is_approved, disclaimer = get_disclaimer() @@ -368,7 +368,7 @@ def update_PyPi_release(vmajor, vminor, vmicro): version = get_tag(vmajor, vminor, vmicro) # read README.md into memory - file = "PyPi_release.md" + file = "PyPI_release.md" fpth = os.path.join(file_paths[file], file) with open(fpth, "r") as file: lines = [line.rstrip() for line in file] diff --git a/setup.cfg b/setup.cfg index 60913fc62e..45f5283031 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ name = flopy version = attr: flopy.version.__version__ description = FloPy is a Python package to create, run, and post-process MODFLOW-based models -long_description = file: docs/PyPi_release.md +long_description = file: docs/PyPI_release.md long_description_content_type = text/markdown author = FloPy Team author_email = modflow@usgs.gov @@ -40,9 +40,6 @@ install_requires = flopy.mf6.data = dfn/*.dfn flopy.plot = mplstyle/*.mplstyle -[sdist] -formats = zip - [flake8] exclude = .git