From 56d514cc70c46b3b7fc68150df378321b732e1cb Mon Sep 17 00:00:00 2001 From: David Whiteside Date: Sun, 7 Apr 2024 10:18:07 -0600 Subject: [PATCH] fixed build packages --- howto_publish_new_release.md | 28 +++++++++++++++------------- pyproject.toml | 6 +++--- setup.py | 6 +++--- src/tempyenv/cli.py | 1 + 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/howto_publish_new_release.md b/howto_publish_new_release.md index e678d6b..3d734fe 100644 --- a/howto_publish_new_release.md +++ b/howto_publish_new_release.md @@ -3,6 +3,7 @@ Test locally ```bash $ python -m pip install -e . +$ tempyenv ``` Build new release @@ -25,24 +26,25 @@ Follow instructions to build and publish to pypi # Setup your ~/.pypirc [distutils] index-servers = - tempyenv - tempyenv-test + pypi + pypi-test -[tempyenv] -repository = https://upload.pypi.org/legacy/ -username = xyz -password = xyz +[pypi] + username = __token__ + password = SECRET -[tempyenv-test] -repository = https://test.pypi.org/legacy/ -username = xyz -password = xyz +[pypi-test] + username = __token__ + password = SECRET # Build +$ python3 -m pip install --upgrade pip +$ python3 -m pip install --upgrade build +$ python3 -m build +$ rm -f dist/* $ python3 -m build -#$ python setup.py bdist_wheel --universal # Upload -$ rm -f dist/* -$ twine upload --repository-url https://upload.pypi.org/legacy/ dist/tempyenv-* +$ python3 -m pip install --upgrade twine +$ python3 -m twine upload --repository pypi dist/* --verbose ``` diff --git a/pyproject.toml b/pyproject.toml index 7185198..945769e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,10 +23,10 @@ requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" [project.scripts] -tempyenv = "tempyenv:cli" +tempyenv = "tempyenv.cli:main" [tool.setuptools] -package-dir = {"" = "lib"} +package-dir = {"" = "src"} [tool.setuptools.packages.find] -where = ["lib"] \ No newline at end of file +where = ["src"] \ No newline at end of file diff --git a/setup.py b/setup.py index 7847098..c317383 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ import os import sys -sys.path.insert(0, os.path.abspath('lib')) +sys.path.insert(0, os.path.abspath('src')) from tempyenv import __version__, __author__ from pathlib import Path @@ -32,9 +32,9 @@ 'setuptools'], include_package_data=True, package_dir={ - '': 'lib'}, + '': 'src'}, package_data = { '': ['*.j2']}, - packages=find_packages('lib'), + packages=find_packages('src'), classifiers=[ 'Environment :: Console', 'Intended Audience :: Developers', diff --git a/src/tempyenv/cli.py b/src/tempyenv/cli.py index 48c91b2..893f68a 100644 --- a/src/tempyenv/cli.py +++ b/src/tempyenv/cli.py @@ -34,6 +34,7 @@ def load_virtual_environment(self): print(f"Error loading virtual environment: {e}") def main(): + print("(tempyenv) is setting up your virtual environment...hold tight") venv_creator = TemporaryVenvCreator() venv_creator.create_temporary_directory() venv_creator.create_virtual_environment()