summaryrefslogtreecommitdiff
path: root/python-django-gulp.spec
blob: 75adfbc6b1fa898fd9fcdc48803b7abbf597dc8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
%global _empty_manifest_terminate_build 0
Name:		python-django-gulp
Version:	4.1.0
Release:	1
Summary:	Run your gulp tasks with runserver and collectstatic
License:	MIT
URL:		https://github.com/beaugunderson/django-gulp
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/5f/1a/d796f16711fdf28b0b2b31f15c77f8c98547e91422be73273cb4776ead26/django-gulp-4.1.0.tar.gz
BuildArch:	noarch


%description
``django-gulp`` overrides ``./manage.py runserver`` and
``./manage.py collectstatic`` so that they also run your gulp tasks.
I’ve used this in conjunction with watchify and livereload in gulp, so
that my simple unadorned runserver automatically watches and compiles
new JavaScript files with browserify and live reloads new CSS that’s
been automatically compiled from SASS.
Installation
~~~~~~~~~~~~
Add ``"django_gulp"`` to your ``INSTALLED_APPS`` setting like this,
making sure that it comes before ``django.contrib.staticfiles`` (or
other apps that override ``runserver`` or ``collectstatic`` in the list
if they’re listed):
   INSTALLED_APPS = (
       'django_gulp',
   )
Now when you run ``./manage.py runserver`` or
``./manage.py collectstatic`` your ``gulp`` tasks will run as well!
Settings
~~~~~~~~
``GULP_CWD`` defaults to the current working directory. Override it if
your ``gulpfile.js`` does not reside within the Django project’s
toplevel directory.
``GULP_PRODUCTION_COMMAND`` defaults to ``gulp build --production``.
``GULP_DEVELOP_COMMAND`` defaults to ``gulp``. Note that when specifying
this setting manually, ``GULP_CWD`` is ignored.
Heroku
~~~~~~
``django-gulp`` works on Heroku! You’ll just need to use buildpack-multi
and make sure your ``.buildpacks`` file looks like this:
   https://github.com/heroku/heroku-buildpack-nodejs.git
   https://github.com/heroku/heroku-buildpack-python.git
To use buildback-multi set your configuration like so:
   $ heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-multi.git
Example output
~~~~~~~~~~~~~~
   $ ./manage.py runserver
   >>> Starting gulp
   >>> gulp process on pid 47863
   Performing system checks...
   System check identified no issues.
   May 04, 2015 - 18:27:52
   Django version 1.8.1, using settings 'example.settings'
   Starting development server at http://127.0.0.1:8000/
   Quit the server with CONTROL-C.
   [18:27:53] Using gulpfile ~/p/example/gulpfile.js
   [18:27:53] Starting 'bower-install'...
   [18:27:54] Using cwd:  /Users/beau/p/example
   [18:27:54] Using bower dir:  static/vendor
   [18:27:54] Starting 'sass'...
   [18:27:54] Starting 'watch'...
   [18:27:54] Finished 'watch' after 19 ms
   [18:27:54] Starting 'watchify'...
   [18:28:08] Watching files required by bundle-about.js
   [18:28:08] Bundling bundle-about.js...
   [18:28:08] Watching files required by bundle-accounts-login.js
   [18:28:08] Bundling bundle-accounts-login.js...
   [18:28:08] Watching files required by bundle-accounts-signup.js
   [18:28:08] Bundling bundle-accounts-signup.js...
   [18:28:08] Watching files required by bundle-activities.js
   [18:28:08] Bundling bundle-activities.js...
   [18:28:08] Finished 'watchify' after 14 s
   [18:28:09] Finished 'sass' after 15 s
   ^C>>> Closing gulp process
   $ ./manage.py collectstatic
   [18:32:54] Using gulpfile ~/p/example/gulpfile.js
   [18:32:54] Starting 'bower-install'...
   [18:32:55] Using cwd:  /Users/beau/p/example
   [18:32:55] Using bower dir:  static/vendor
   [18:32:55] Starting 'sass'...
   [18:32:56] Starting 'browserify'...
   [18:33:05] Bundling bundle-about.js...
   [18:33:05] Bundling bundle-accounts-login.js...
   [18:33:05] Bundling bundle-accounts-signup.js...
   [18:33:05] Bundling bundle-activities.js...
   [18:33:05] Finished 'browserify' after 9.39 s
   [18:33:08] Finished 'sass' after 13 s
   [18:33:14] Finished 'bower-install' after 19 s
   [18:33:14] Starting 'bower-main-files'...
   [18:33:14] Starting 'bower-detritus'...
   [18:33:14] Finished 'bower-main-files' after 104 ms
   [18:33:14] Finished 'bower-detritus' after 507 ms
   [18:33:14] Starting 'bower'...
   [18:33:14] Finished 'bower' after 18 μs
   [18:33:14] Starting 'build'...
   [18:33:14] Finished 'build' after 5 μs
   You have requested to collect static files at the destination
   location as specified in your settings:
       /Users/beau/p/example/static-files
   This will overwrite existing files!
   Are you sure you want to do this?
   Type 'yes' to continue, or 'no' to cancel: yes
   Copying '/Users/beau/p/example/build/js/bundle-about.js'
   Copying '/Users/beau/p/example/build/js/bundle-about.map.json'
   Copying '/Users/beau/p/example/build/js/bundle-accounts-login.js'
   Copying '/Users/beau/p/example/build/js/bundle-accounts-login.map.json'
   Copying '/Users/beau/p/example/build/js/bundle-accounts-signup.js'
   Copying '/Users/beau/p/example/build/js/bundle-accounts-signup.map.json'
   Copying '/Users/beau/p/example/build/js/bundle-activities.js'
   Copying '/Users/beau/p/example/build/js/bundle-activities.map.json'

%package -n python3-django-gulp
Summary:	Run your gulp tasks with runserver and collectstatic
Provides:	python-django-gulp
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-django-gulp
``django-gulp`` overrides ``./manage.py runserver`` and
``./manage.py collectstatic`` so that they also run your gulp tasks.
I’ve used this in conjunction with watchify and livereload in gulp, so
that my simple unadorned runserver automatically watches and compiles
new JavaScript files with browserify and live reloads new CSS that’s
been automatically compiled from SASS.
Installation
~~~~~~~~~~~~
Add ``"django_gulp"`` to your ``INSTALLED_APPS`` setting like this,
making sure that it comes before ``django.contrib.staticfiles`` (or
other apps that override ``runserver`` or ``collectstatic`` in the list
if they’re listed):
   INSTALLED_APPS = (
       'django_gulp',
   )
Now when you run ``./manage.py runserver`` or
``./manage.py collectstatic`` your ``gulp`` tasks will run as well!
Settings
~~~~~~~~
``GULP_CWD`` defaults to the current working directory. Override it if
your ``gulpfile.js`` does not reside within the Django project’s
toplevel directory.
``GULP_PRODUCTION_COMMAND`` defaults to ``gulp build --production``.
``GULP_DEVELOP_COMMAND`` defaults to ``gulp``. Note that when specifying
this setting manually, ``GULP_CWD`` is ignored.
Heroku
~~~~~~
``django-gulp`` works on Heroku! You’ll just need to use buildpack-multi
and make sure your ``.buildpacks`` file looks like this:
   https://github.com/heroku/heroku-buildpack-nodejs.git
   https://github.com/heroku/heroku-buildpack-python.git
To use buildback-multi set your configuration like so:
   $ heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-multi.git
Example output
~~~~~~~~~~~~~~
   $ ./manage.py runserver
   >>> Starting gulp
   >>> gulp process on pid 47863
   Performing system checks...
   System check identified no issues.
   May 04, 2015 - 18:27:52
   Django version 1.8.1, using settings 'example.settings'
   Starting development server at http://127.0.0.1:8000/
   Quit the server with CONTROL-C.
   [18:27:53] Using gulpfile ~/p/example/gulpfile.js
   [18:27:53] Starting 'bower-install'...
   [18:27:54] Using cwd:  /Users/beau/p/example
   [18:27:54] Using bower dir:  static/vendor
   [18:27:54] Starting 'sass'...
   [18:27:54] Starting 'watch'...
   [18:27:54] Finished 'watch' after 19 ms
   [18:27:54] Starting 'watchify'...
   [18:28:08] Watching files required by bundle-about.js
   [18:28:08] Bundling bundle-about.js...
   [18:28:08] Watching files required by bundle-accounts-login.js
   [18:28:08] Bundling bundle-accounts-login.js...
   [18:28:08] Watching files required by bundle-accounts-signup.js
   [18:28:08] Bundling bundle-accounts-signup.js...
   [18:28:08] Watching files required by bundle-activities.js
   [18:28:08] Bundling bundle-activities.js...
   [18:28:08] Finished 'watchify' after 14 s
   [18:28:09] Finished 'sass' after 15 s
   ^C>>> Closing gulp process
   $ ./manage.py collectstatic
   [18:32:54] Using gulpfile ~/p/example/gulpfile.js
   [18:32:54] Starting 'bower-install'...
   [18:32:55] Using cwd:  /Users/beau/p/example
   [18:32:55] Using bower dir:  static/vendor
   [18:32:55] Starting 'sass'...
   [18:32:56] Starting 'browserify'...
   [18:33:05] Bundling bundle-about.js...
   [18:33:05] Bundling bundle-accounts-login.js...
   [18:33:05] Bundling bundle-accounts-signup.js...
   [18:33:05] Bundling bundle-activities.js...
   [18:33:05] Finished 'browserify' after 9.39 s
   [18:33:08] Finished 'sass' after 13 s
   [18:33:14] Finished 'bower-install' after 19 s
   [18:33:14] Starting 'bower-main-files'...
   [18:33:14] Starting 'bower-detritus'...
   [18:33:14] Finished 'bower-main-files' after 104 ms
   [18:33:14] Finished 'bower-detritus' after 507 ms
   [18:33:14] Starting 'bower'...
   [18:33:14] Finished 'bower' after 18 μs
   [18:33:14] Starting 'build'...
   [18:33:14] Finished 'build' after 5 μs
   You have requested to collect static files at the destination
   location as specified in your settings:
       /Users/beau/p/example/static-files
   This will overwrite existing files!
   Are you sure you want to do this?
   Type 'yes' to continue, or 'no' to cancel: yes
   Copying '/Users/beau/p/example/build/js/bundle-about.js'
   Copying '/Users/beau/p/example/build/js/bundle-about.map.json'
   Copying '/Users/beau/p/example/build/js/bundle-accounts-login.js'
   Copying '/Users/beau/p/example/build/js/bundle-accounts-login.map.json'
   Copying '/Users/beau/p/example/build/js/bundle-accounts-signup.js'
   Copying '/Users/beau/p/example/build/js/bundle-accounts-signup.map.json'
   Copying '/Users/beau/p/example/build/js/bundle-activities.js'
   Copying '/Users/beau/p/example/build/js/bundle-activities.map.json'

%package help
Summary:	Development documents and examples for django-gulp
Provides:	python3-django-gulp-doc
%description help
``django-gulp`` overrides ``./manage.py runserver`` and
``./manage.py collectstatic`` so that they also run your gulp tasks.
I’ve used this in conjunction with watchify and livereload in gulp, so
that my simple unadorned runserver automatically watches and compiles
new JavaScript files with browserify and live reloads new CSS that’s
been automatically compiled from SASS.
Installation
~~~~~~~~~~~~
Add ``"django_gulp"`` to your ``INSTALLED_APPS`` setting like this,
making sure that it comes before ``django.contrib.staticfiles`` (or
other apps that override ``runserver`` or ``collectstatic`` in the list
if they’re listed):
   INSTALLED_APPS = (
       'django_gulp',
   )
Now when you run ``./manage.py runserver`` or
``./manage.py collectstatic`` your ``gulp`` tasks will run as well!
Settings
~~~~~~~~
``GULP_CWD`` defaults to the current working directory. Override it if
your ``gulpfile.js`` does not reside within the Django project’s
toplevel directory.
``GULP_PRODUCTION_COMMAND`` defaults to ``gulp build --production``.
``GULP_DEVELOP_COMMAND`` defaults to ``gulp``. Note that when specifying
this setting manually, ``GULP_CWD`` is ignored.
Heroku
~~~~~~
``django-gulp`` works on Heroku! You’ll just need to use buildpack-multi
and make sure your ``.buildpacks`` file looks like this:
   https://github.com/heroku/heroku-buildpack-nodejs.git
   https://github.com/heroku/heroku-buildpack-python.git
To use buildback-multi set your configuration like so:
   $ heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-multi.git
Example output
~~~~~~~~~~~~~~
   $ ./manage.py runserver
   >>> Starting gulp
   >>> gulp process on pid 47863
   Performing system checks...
   System check identified no issues.
   May 04, 2015 - 18:27:52
   Django version 1.8.1, using settings 'example.settings'
   Starting development server at http://127.0.0.1:8000/
   Quit the server with CONTROL-C.
   [18:27:53] Using gulpfile ~/p/example/gulpfile.js
   [18:27:53] Starting 'bower-install'...
   [18:27:54] Using cwd:  /Users/beau/p/example
   [18:27:54] Using bower dir:  static/vendor
   [18:27:54] Starting 'sass'...
   [18:27:54] Starting 'watch'...
   [18:27:54] Finished 'watch' after 19 ms
   [18:27:54] Starting 'watchify'...
   [18:28:08] Watching files required by bundle-about.js
   [18:28:08] Bundling bundle-about.js...
   [18:28:08] Watching files required by bundle-accounts-login.js
   [18:28:08] Bundling bundle-accounts-login.js...
   [18:28:08] Watching files required by bundle-accounts-signup.js
   [18:28:08] Bundling bundle-accounts-signup.js...
   [18:28:08] Watching files required by bundle-activities.js
   [18:28:08] Bundling bundle-activities.js...
   [18:28:08] Finished 'watchify' after 14 s
   [18:28:09] Finished 'sass' after 15 s
   ^C>>> Closing gulp process
   $ ./manage.py collectstatic
   [18:32:54] Using gulpfile ~/p/example/gulpfile.js
   [18:32:54] Starting 'bower-install'...
   [18:32:55] Using cwd:  /Users/beau/p/example
   [18:32:55] Using bower dir:  static/vendor
   [18:32:55] Starting 'sass'...
   [18:32:56] Starting 'browserify'...
   [18:33:05] Bundling bundle-about.js...
   [18:33:05] Bundling bundle-accounts-login.js...
   [18:33:05] Bundling bundle-accounts-signup.js...
   [18:33:05] Bundling bundle-activities.js...
   [18:33:05] Finished 'browserify' after 9.39 s
   [18:33:08] Finished 'sass' after 13 s
   [18:33:14] Finished 'bower-install' after 19 s
   [18:33:14] Starting 'bower-main-files'...
   [18:33:14] Starting 'bower-detritus'...
   [18:33:14] Finished 'bower-main-files' after 104 ms
   [18:33:14] Finished 'bower-detritus' after 507 ms
   [18:33:14] Starting 'bower'...
   [18:33:14] Finished 'bower' after 18 μs
   [18:33:14] Starting 'build'...
   [18:33:14] Finished 'build' after 5 μs
   You have requested to collect static files at the destination
   location as specified in your settings:
       /Users/beau/p/example/static-files
   This will overwrite existing files!
   Are you sure you want to do this?
   Type 'yes' to continue, or 'no' to cancel: yes
   Copying '/Users/beau/p/example/build/js/bundle-about.js'
   Copying '/Users/beau/p/example/build/js/bundle-about.map.json'
   Copying '/Users/beau/p/example/build/js/bundle-accounts-login.js'
   Copying '/Users/beau/p/example/build/js/bundle-accounts-login.map.json'
   Copying '/Users/beau/p/example/build/js/bundle-accounts-signup.js'
   Copying '/Users/beau/p/example/build/js/bundle-accounts-signup.map.json'
   Copying '/Users/beau/p/example/build/js/bundle-activities.js'
   Copying '/Users/beau/p/example/build/js/bundle-activities.map.json'

%prep
%autosetup -n django-gulp-4.1.0

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-django-gulp -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 4.1.0-1
- Package Spec generated