瀏覽代碼

setuptools recognises src these days, no config is needed. (#4206)

* setuptools recognises src these days, not config is needed.
Aded separate package command that follows the guide at https://github.com/django-oscar/django-oscar/wiki/Releasing

* removed unused function
master
Voxin Muyli 1 年之前
父節點
當前提交
c58332359e
No account linked to committer's email address
共有 2 個文件被更改,包括 11 次插入8 次删除
  1. 10
    5
      Makefile
  2. 1
    3
      setup.py

+ 10
- 5
Makefile 查看文件

@@ -3,7 +3,7 @@ PYTEST = $(PWD)/$(VENV)/bin/py.test
3 3
 
4 4
 # These targets are not files
5 5
 .PHONY: build_sandbox clean compile_translations coverage css docs extract_translations help install install-python \
6
- install-test install-js lint release retest sandbox_clean sandbox_image sandbox test todo venv
6
+ install-test install-js lint release retest sandbox_clean sandbox_image sandbox test todo venv package
7 7
 
8 8
 help: ## Display this help message
9 9
 	@echo "Please use \`make <target>\` where <target> is one of"
@@ -118,10 +118,15 @@ todo: ## Look for areas of the code that need updating when some event has taken
118 118
 	-grep -rnH TODO src/oscar/apps/
119 119
 	-grep -rnH "django.VERSION" src/oscar/apps
120 120
 
121
-release: clean ## Creates release
122
-	pip install twine wheel
123
-	rm -rf dist/*
124
-	rm -rf src/oscar/static/*
121
+package: clean
122
+	pip install --upgrade pip twine wheel
123
+	npm ci
124
+	rm -rf src/oscar/static/
125
+	rm -rf dist/
126
+	rm -rf build/
125 127
 	npm run build
128
+	python setup.py clean --all
126 129
 	python setup.py sdist bdist_wheel
130
+
131
+release: package ## Creates release
127 132
 	twine upload -s dist/*

+ 1
- 3
setup.py 查看文件

@@ -10,7 +10,7 @@ import os
10 10
 import re
11 11
 import sys
12 12
 
13
-from setuptools import find_packages, setup
13
+from setuptools import setup
14 14
 
15 15
 PROJECT_DIR = os.path.dirname(__file__)
16 16
 
@@ -84,8 +84,6 @@ setup(
84 84
     keywords="E-commerce, Django, domain-driven",
85 85
     license='BSD',
86 86
     platforms=['linux'],
87
-    package_dir={'': 'src'},
88
-    packages=find_packages('src'),
89 87
     include_package_data=True,
90 88
     python_requires='>=3.8',
91 89
     install_requires=install_requires,

Loading…
取消
儲存