No acceptable *python* could be found
[mediagoblin.git] / Makefile.in
CommitLineData
0a2eecf8
BI
1# Makefile.in
2#
3# Copyright © 2012, 2013 Brandon Invergo <brandon@invergo.net>
4#
5# Copying and distribution of this file, with or without modification,
6# are permitted in any medium without royalty provided the copyright
7# notice and this notice are preserved. This file is offered as-is,
8# without any warranty.
9
10# List whatever files you want to include in your source distribution here.
11# You can include whole directories but note that *everything* under that
12# directory will be included
13DISTFILES = PKG-INFO Makefile.in configure setup.py install-sh
14
15DESTDIR =
16VPATH = @srcdir@
17PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
18PACKAGE_NAME = @PACKAGE_NAME@
19PACKAGE_STRING = @PACKAGE_STRING@
20PACKAGE_TARNAME = @PACKAGE_TARNAME@
21PACKAGE_DISTNAME = ${PACKAGE_NAME}-${PACKAGE_VERSION}
22PACKAGE_URL = @PACKAGE_URL@
23PACKAGE_VERSION = @PACKAGE_VERSION@
24PATH_SEPARATOR = @PATH_SEPARATOR@
25PYTHON = @PYTHON@
26VIRTUALENV = @VIRTUALENV@
0a2eecf8
BI
27SHELL = @SHELL@
28MKDIR_P = @MKDIR_P@
29INSTALL = @INSTALL@
30INSTALL_PROGRAM = @INSTALL_PROGRAM@
31INSTALL_DATA = @INSTALL_DATA@
32INSTALL_SCRIPT = @INSTALL_SCRIPT@
33docdir = @docdir@
34dvidir = @dvidir@
35exec_prefix = @exec_prefix@
36htmldir = @htmldir@
37includedir = @includedir@
38infodir = @infodir@
39prefix = @prefix@
40srcdir = @srcdir@
e56b493a 41abs_srcdir = @abs_srcdir@
0a2eecf8
BI
42datadir = @datadir@
43datarootdir = @datarootdir@
0a2eecf8
BI
44pkgdatadir = $(datadir)/@PACKAGE_NAME@
45pkgincludedir = $(includedir)/@PACKAGE_NAME@
0a2eecf8
BI
46PYTHONPATH = $(pythondir)$(PATH_SEPARATOR)$(DESTDIR)$(pythondir)
47
96f9c530
CAW
48# pkgpythondir = @pkgpythondir@
49# pkgpyexecdir = @pkgpyexecdir@
50# pythondir = @pythondir@
51# pyexecdir = @pyexecdir@
52# SPHINXBUILD = @SPHINXBUILD@
53# POSTGRES = @POSTGRES@
54
55
07778a69
CAW
56# Maybe add a virtualenv prefix to a command
57ifneq ($(VIRTUALENV),no)
58# virtualenv specified to be included by config (default)
59# ... we only use virtualenv for local development, we don't
60# auto-deploy to it.
0a2eecf8 61
07778a69
CAW
62maybe_venved = ./bin/
63maybe_venved_python = ./bin/python
64# Yes, build the virtualenv as a dependency!
65maybe_venv_dep = ./bin/python
0a2eecf8 66
0a2eecf8 67else
07778a69
CAW
68# --without-virtualenv must have been passed in... don't build
69# a local virtualenv or use such commands
70maybe_venved =
71maybe_venved_python = $(PYTHON)
72# No need for commands to build virtualenv as a dependency!
73maybe_venv_dep =
0a2eecf8 74endif
07778a69
CAW
75
76
77
78.PHONY: all install uninstall distclean info install-html html \
79install-pdf pdf install-dvi dvi install-ps ps clean dist check \
80installdirs i18n virtualenv
81# update postgresql
82
83all: develop
84
96f9c530 85develop: $(maybe_venv_dep) i18n
07778a69
CAW
86 echo "nothin yet"
87
96f9c530
CAW
88# base-configs: paste.ini mediagoblin.example.ini
89
07778a69
CAW
90install: installdirs
91 $(maybe_venved_python) $(srcdir)/setup.py install --prefix=$(DESTDIR)$(prefix)
92
93
94i18n: $(maybe_venv_dep)
95 $(maybe_venved)pybabel compile -D mediagoblin -d mediagoblin/i18n/
96
97
0a2eecf8 98ifneq ($(VIRTUALENV),no)
07778a69
CAW
99./bin/python:
100 rm -f ./bin/python
101 virtualenv --system-site-packages .
102 ./bin/python setup.py develop --upgrade
0a2eecf8 103
07778a69 104virtualenv: bin/python
96f9c530
CAW
105
106clean-virtualenv:
107 rm -rf ./bin/
108 rm -rf ./lib/
07778a69 109endif
0a2eecf8
BI
110
111# setup.py doesn't (yet) support an uninstall command, so until it does, you
112# must manually remove everything that was installed here. The following example
113# should remove a basic package installed via setup.py, but please double- and
114# triple-check it so that you don't remove something you shouldn't!
115# Be sure to remove any extra files you install, such as binaries or documentation!
a9dc855a 116#
297a262c 117# uninstall:
a9dc855a
CAW
118# rm -rvf $(pkgpythondir)
119# rm -v $(pythondir)/$(PACKAGE_DISTNAME)-*.egg-info
120#
0a2eecf8
BI
121
122# Just use the usual setup.py clean command
123clean:
07778a69 124 $(maybe_venved_python) setup.py clean
0a2eecf8
BI
125
126
127# Clean up the output of configure
128distclean:
129 rm -v $(srcdir)/config.log
130 rm -v $(srcdir)/config.status
131 rm -rvf $(srcdir)/autom4te.cache
e4801f4d 132 rm -v $(srcdir)/aclocal.m4
0a2eecf8 133 rm -v $(srcdir)/Makefile
96f9c530
CAW
134 rm -v $(srcdir)/env
135
0a2eecf8
BI
136
137# You can either use the setup.py sdist command or you can roll your own here
138dist:
07778a69 139# $(maybe_venved_python) setup.py sdist
0a2eecf8
BI
140 mkdir $(PACKAGE_DISTNAME)
141 cp -r $(DISTFILES) $(PACKAGE_DISTNAME)
142 tar -czf $(PACKAGE_DISTNAME).tar.gz $(PACKAGE_DISTNAME)
143 rm -rf $(PACKAGE_DISTNAME)
144
145# Use the setup.py check command
146check:
07778a69 147 $(maybe_venved_python) setup.py check
0a2eecf8
BI
148
149# setup.py might complain if a directory doesn't exist so just in case, make the directory
150# here
151installdirs:
d45673c0 152 $(MKDIR_P) $(DESTDIR)$(prefix)
0a2eecf8 153
07778a69
CAW
154# # Set up PostgreSQL
155# postgresql:
156# sudo -u $(POSTGRES) createuser mediagoblin
157# sudo -u $(POSTGRES) createdb -E UNICODE -O mediagoblin mediagoblin
0a2eecf8 158
07778a69
CAW
159# update:
160# ifneq ($(VIRTUALENV),no)
161# $(prefix)/bin/python $(srcdir)/setup.py develop --prefix=$(prefix) --upgrade
162# else
163# $(PYTHON) $(srcdir)/setup.py develop --prefix=$(prefix) --upgrade
164# endif
165# $(prefix)/bin/gmg dbupdate
0a2eecf8
BI
166
167# The following show how to install documentation. In this example,
168# docs are built from a separate Makefile contained in the docs
169# directory which uses the SPHINXBUILD variable to store the location
170# of the sphinx-build (Python doc tool) binary to use.
171
172$(DESTDIR)$(infodir)/mediagoblin.info: docs/build/texinfo/mediagoblin.info
173 $(POST_INSTALL)
174 $(INSTALL_DATA) @< $(DESTDIR)$@
175 if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then
176 install-info --dir-file=$(DESTDIR)$(infodir)/dir \
177 $(DESTDIR)$(infodir)/foo.info;
178 else true; fi
179
180info: docs/build/texinfo/mediagoblin.info
181
182docs/build/texinfo/mediagoblin.info: $(wildcard docs/source/*)
183ifneq ($(SPHINXBUILD),no)
184 $(MAKE) -C docs info SPHINXBUILD=$(SPHINXBUILD)
185endif
186
187
188install-html: html installdirs
189 $(INSTALL_DATA) docs/build/html/* $(DESTDIR)$(htmldir)
190
191html: docs/build/html/index.html
192
193docs/build/html/index.html: $(wildcard $(srcdir)/docs/source/*)
194ifneq ($(SPHINXBUILD),no)
195 $(MAKE) -C docs html SPHINXBUILD=$(SPHINXBUILD)
196endif
197
198
199install-pdf: pdf installdirs
200 $(INSTALL_DATA) docs/build/latex/mediagoblin.pdf $(DESTDIR)$(pdfdir)
201
202pdf: docs/build/latex/mediagoblin.pdf
203
204docs/build/latex/mediagoblin.pdf: $(wildcard $(srcdir)/docs/source/*)
205ifneq ($(SPHINXBUILD),no)
206 $(MAKE) -C docs latexpdf SPHINXBUILD=$(SPHINXBUILD)
207endif
208
209
07778a69
CAW
210# Targets that don't seem supported?
211
0a2eecf8
BI
212install-dvi:
213
214dvi:
215
216install-ps:
217
218ps:
219
220