Update makefile and setup config

This commit is contained in:
Brandon Myers 2019-07-02 18:50:38 -05:00
Родитель 764560b100
Коммит 826117b24d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 8AA79AD83045BBC7
2 изменённых файлов: 43 добавлений и 14 удалений

Просмотреть файл

@ -4,11 +4,49 @@
# Copyright (c) 2014-2017 Mozilla Corporation
# Author: gdestuynder@mozilla.com
all:
./setup.py build
install:
./setup.py install
.PHONY: clean clean-pyc clean-build help
.DEFAULT_GOAL := help
define PRINT_HELP_PYSCRIPT
import re, sys
for line in sys.stdin:
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
if match:
target, help = match.groups()
print("%-20s %s" % (target, help))
endef
export PRINT_HELP_PYSCRIPT
help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
clean: clean-build clean-pyc ## remove all build and Python artifacts
clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
clean-pyc: ## remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
release: dist ## package and upload a release
twine upload dist/*
dist: clean ## builds source and wheel package
python setup.py sdist
python setup.py bdist_wheel
ls -l dist
install: clean ## install the package to the active Python's site-packages
python setup.py install
rpm:
fpm -s python -t rpm -d pytz -d python-requests-futures --replaces python-mozdef ./setup.py
@ -19,12 +57,3 @@ deb:
tests: test
test:
py.test tests
pypi:
python setup.py sdist check upload --sign
clean:
rm -rf *pyc
rm -rf build
rm -rf __pycache__
rm -rf dist

Просмотреть файл

@ -1,2 +1,2 @@
[bdist_rpm]
release = 1%{?dist}
release = 1%%{?dist}