Browse Source

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 year ago
parent
commit
c58332359e
No account linked to committer's email address
2 changed files with 11 additions and 8 deletions
  1. 10
    5
      Makefile
  2. 1
    3
      setup.py

+ 10
- 5
Makefile View File

3
 
3
 
4
 # These targets are not files
4
 # These targets are not files
5
 .PHONY: build_sandbox clean compile_translations coverage css docs extract_translations help install install-python \
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
 help: ## Display this help message
8
 help: ## Display this help message
9
 	@echo "Please use \`make <target>\` where <target> is one of"
9
 	@echo "Please use \`make <target>\` where <target> is one of"
118
 	-grep -rnH TODO src/oscar/apps/
118
 	-grep -rnH TODO src/oscar/apps/
119
 	-grep -rnH "django.VERSION" src/oscar/apps
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
 	npm run build
127
 	npm run build
128
+	python setup.py clean --all
126
 	python setup.py sdist bdist_wheel
129
 	python setup.py sdist bdist_wheel
130
+
131
+release: package ## Creates release
127
 	twine upload -s dist/*
132
 	twine upload -s dist/*

+ 1
- 3
setup.py View File

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

Loading…
Cancel
Save