Skip to content

Commit

Permalink
fixed build packages
Browse files Browse the repository at this point in the history
  • Loading branch information
thedavidwhiteside committed Apr 7, 2024
1 parent 575de22 commit 56d514c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
28 changes: 15 additions & 13 deletions howto_publish_new_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Test locally

```bash
$ python -m pip install -e .
$ tempyenv
```

Build new release
Expand All @@ -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
```
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
where = ["src"]
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions src/tempyenv/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 56d514c

Please sign in to comment.