Skip to content

Commit

Permalink
Fixing twine build process
Browse files Browse the repository at this point in the history
  • Loading branch information
rmyers committed Apr 26, 2023
1 parent 6f313e7 commit fac04bb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
14 changes: 2 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ VIRTUAL_ENV ?= .venv
PYTHON_MODULES := $(shell find . -name '*.py')
DOCKER_COMPOSE := $(shell which docker-compose)

export TWINE_NON_INTERACTIVE=1

.SILENT: help
.PHONY: setup docs clean
.PHONY: test flake8 unit
Expand Down Expand Up @@ -79,22 +81,10 @@ docs: setup ## Build the documentation
$(VIRTUAL_ENV)/bin/sphinx-build -a docs docs/_build

publish-test: setup ## Publish the library to test pypi
ifndef TWINE_USERNAME
$(error "You must set the TWINE_USERNAME env variable 'export TWINE_USERNAME=theusername'")
endif
ifndef TWINE_PASSWORD
$(error "You must set the TWINE_PASSWORD env variable 'export TWINE_PASSWORD=thevalueofthepassword'")
endif
$(VIRTUAL_ENV)/bin/python setup.py sdist bdist_wheel
$(VIRTUAL_ENV)/bin/python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*

publish: setup ## Publish the library to pypi
ifndef TWINE_USERNAME
$(error "You must set the TWINE_USERNAME env variable 'export TWINE_USERNAME=theusername'")
endif
ifndef TWINE_PASSWORD
$(error "You must set the TWINE_PASSWORD env variable 'export TWINE_PASSWORD=thevalueofthepassword'")
endif
$(VIRTUAL_ENV)/bin/python setup.py sdist bdist_wheel
$(VIRTUAL_ENV)/bin/python -m twine upload dist/*

Expand Down
2 changes: 1 addition & 1 deletion cannula/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"gql",
]

__VERSION__ = "0.0.3"
__VERSION__ = "0.0.4"
3 changes: 2 additions & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ mypy==1.2.0
Sphinx==2.0.1

# twine PYPI Publish
twine==1.13.0
twine==4.0.2
setuptools==65.5.1
wheel==0.40.0
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ author= Robert Myers
author_email = robert@julython.org
description = Async GraphQL Helper Library
url = https://github.com/rmyers/cannula
long_description = file: README.md, CHANGELOG.md
long_description = file: README.md
long_description_content_type = text/markdown
keywords = graphql
license = MIT License
Expand Down

0 comments on commit fac04bb

Please sign in to comment.