| 1 |
# Copyright (C) 2006, Nuxeo SAS <http://www.nuxeo.com> |
|---|
| 2 |
# Author: Julien Anguenot <ja@nuxeo.com> |
|---|
| 3 |
# |
|---|
| 4 |
# This library is free software; you can redistribute it and/or |
|---|
| 5 |
# modify it under the terms of the GNU Lesser General Public |
|---|
| 6 |
# License as published by the Free Software Foundation; either |
|---|
| 7 |
# version 2.1 of the License, or (at your option) any later version. |
|---|
| 8 |
# |
|---|
| 9 |
# This library is distributed in the hope that it will be useful, |
|---|
| 10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 12 |
# Lesser General Public License for more details. |
|---|
| 13 |
# |
|---|
| 14 |
# You should have received a copy of the GNU Lesser General Public |
|---|
| 15 |
# License along with this library; if not, write to the Free Software |
|---|
| 16 |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-13 |
|---|
| 17 |
"""Setup using zpksupport |
|---|
| 18 |
|
|---|
| 19 |
$Id$ |
|---|
| 20 |
""" |
|---|
| 21 |
import os |
|---|
| 22 |
import site |
|---|
| 23 |
import sys |
|---|
| 24 |
|
|---|
| 25 |
here = os.path.dirname(os.path.abspath(__file__)) |
|---|
| 26 |
buildsupport = os.path.join(here, "buildsupport") |
|---|
| 27 |
|
|---|
| 28 |
# Add 'buildsupport' to sys.path and process *.pth files from 'buildsupport': |
|---|
| 29 |
last = len(sys.path) |
|---|
| 30 |
site.addsitedir(buildsupport) |
|---|
| 31 |
if len(sys.path) > last: |
|---|
| 32 |
# Move all appended directories to the start. |
|---|
| 33 |
# Make sure we use ZConfig shipped with the distribution |
|---|
| 34 |
new = sys.path[last:] |
|---|
| 35 |
del sys.path[last:] |
|---|
| 36 |
sys.path[:0] = new |
|---|
| 37 |
|
|---|
| 38 |
import zpkgsetup.package |
|---|
| 39 |
import zpkgsetup.publication |
|---|
| 40 |
import zpkgsetup.setup |
|---|
| 41 |
|
|---|
| 42 |
VERSION = "0.1.0" |
|---|
| 43 |
|
|---|
| 44 |
context = zpkgsetup.setup.SetupContext( |
|---|
| 45 |
"NXLucene", VERSION, __file__) |
|---|
| 46 |
|
|---|
| 47 |
context.load_metadata( |
|---|
| 48 |
os.path.join(here, |
|---|
| 49 |
zpkgsetup.publication.PUBLICATION_CONF)) |
|---|
| 50 |
|
|---|
| 51 |
context.walk_packages("src") |
|---|
| 52 |
context.setup() |
|---|