浏览代码

Makefile: stop using python setup.py commands

Mort Yao 9 月之前
父节点
当前提交
08ff14c455
共有 1 个文件被更改,包括 8 次插入24 次删除
  1. 8 24
      Makefile

+ 8 - 24
Makefile

@@ -1,11 +1,9 @@
-SETUP = python3 setup.py
-
-.PHONY: default i test clean all html rst build sdist bdist bdist_egg bdist_wheel install release
+.PHONY: default i test clean all html rst build install release
 
 default: i
 
 i:
-	@(cd src/; python3 -i -c 'import you_get; print("You-Get %s\n>>> import you_get" % you_get.version.__version__)')
+	@(cd src; python -i -c 'import you_get; print("You-Get %s\n>>> import you_get" % you_get.version.__version__)')
 
 test:
 	(cd src; python -m unittest discover -s ../tests)
@@ -16,7 +14,7 @@ clean:
 	find . | grep __pycache__ | xargs rm -fr
 	find . | grep .pyc | xargs rm -f
 
-all: build sdist bdist bdist_egg bdist_wheel
+all: build
 
 html:
 	pandoc README.md > README.html
@@ -25,25 +23,11 @@ rst:
 	pandoc -s -t rst README.md > README.rst
 
 build:
-	$(SETUP) build
-
-sdist:
-	$(SETUP) sdist
-
-bdist:
-	$(SETUP) bdist
-
-bdist_egg:
-	$(SETUP) bdist_egg
-
-bdist_wheel:
-	$(SETUP) bdist_wheel
+	python -m build
 
 install:
-	$(SETUP) install --user --prefix=
+	python -m pip install .
 
-release:
-	#zenity --question
-	$(SETUP) sdist bdist_wheel
-	echo 'Upload new version to PyPI using:'
-	echo '	twine upload --sign dist/you-get-VERSION.tar.gz dist/you_get-VERSION-py3-none-any.whl'
+release: build
+	@echo 'Upload new version to PyPI using:'
+	@echo '	twine upload --sign dist/you_get-VERSION*'