audreyfeldroy / cookiecutter-pypackage

Cookiecutter template for a Python package.
BSD 3-Clause "New" or "Revised" License
4.26k stars 1.78k forks source link

make release error #418

Closed hectormartinezdev closed 6 years ago

hectormartinezdev commented 6 years ago

Description

make release calls clean, which calls clean-build, which removes the dist folder and twine upload dist/* fails.

What I Did

(taika) hector@hector ~/DATA/Documentos/projects/taika $ make release
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
twine upload dist/*
ValueError: Cannot find file (or expand pattern): 'dist/*'
Makefile:79: fallo en las instrucciones para el objetivo 'release'
make: *** [release] Error 1

Edit: bad command names. Edit2: title typo.

aubricus commented 6 years ago

I am seeing this issue as well.

My temporary fix looks like this:

release: upload clean ## Upload a release, clean

upload: ## package and upload a release
    twine upload dist/*

Edit: Fix typo

hectormartinezdev commented 6 years ago

My fix is:

release: clean dist upload clean ## clean, build, upload and clean again

upload: ## upload the contents of dist/* with twine
        twine upload dist/*

I didn't think about doing an upload target, I was using $(MAKE) clean at the end of release target file to call again clean. But you inspired me :+1:

Edit: typos everywhere

aubricus commented 6 years ago

Looks like there's a PR #420 that addresses this also.

hectormartinezdev commented 6 years ago

Closing this then, since there is a PR that addresses it.