Merge lp:~andrea.corbellini/beeseek/makefile into lp:beeseek/1.0

Proposed by Andrea Corbellini
Status: Merged
Approved by: Andrea Corbellini
Approved revision: 212
Merged at revision: not available
Proposed branch: lp:~andrea.corbellini/beeseek/makefile
Merge into: lp:beeseek/1.0
Diff against target: None lines
To merge this branch: bzr merge lp:~andrea.corbellini/beeseek/makefile
Reviewer Review Type Date Requested Status
Andrea Colangelo Approve
Review via email: mp+3265@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Andrea Corbellini (andrea.corbellini) wrote :

This branch adds a Makefile which builds, installs and checks our
software. Every component (Base Library, Hive and Honeybee) is build and
installed separately so that it is easier to distribute everything in
separated packages.

Revision history for this message
Andrea Colangelo (warp10) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'Makefile'
2--- Makefile 1970-01-01 00:00:00 +0000
3+++ Makefile 2009-01-30 17:34:49 +0000
4@@ -0,0 +1,60 @@
5+# Copyright (C) 2007-2009 BeeSeek Developers
6+#
7+# This program is free software: you can redistribute it and/or modify
8+# it under the terms of the GNU Affero General Public License as
9+# published by the Free Software Foundation, either version 3 of the
10+# License, or (at your option) any later version.
11+#
12+# This program is distributed in the hope that it will be useful,
13+# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+# GNU Affero General Public License for more details.
16+#
17+# You should have received a copy of the GNU Affero General Public License
18+# along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
20+PYTHON=/usr/bin/python
21+
22+all: build-all
23+build: build-all
24+build-all: build-hive build-honeybee build-base
25+
26+build-hive:
27+ $(PYTHON) setup.py build hive
28+ mv $(CURDIR)/build $(CURDIR)/build-hive
29+build-honeybee:
30+ $(PYTHON) setup.py build honeybee
31+ mv $(CURDIR)/build $(CURDIR)/build-honeybee
32+build-base:
33+ $(PYTHON) setup.py build base
34+ mv $(CURDIR)/build $(CURDIR)/build-base
35+
36+install: install-all
37+install-all: install-hive install-honeybee install-base
38+
39+install-hive:
40+ $(PYTHON) setup.py install hive
41+install-honeybee:
42+ $(PYTHON) setup.py install honeybee
43+install-base:
44+ $(PYTHON) setup.py install base
45+
46+
47+pychecker:
48+ find beeseek -name "*.py" | xargs pychecker --limit=100000
49+
50+pyflakes:
51+ pyflakes beeseek
52+
53+pylint:
54+ pylint -f parseable --max-line-length 78 beeseek
55+
56+xxxreport:
57+ pylint -f parseable -r no --enable-checker miscellaneous beeseek
58+
59+
60+clean:
61+ rm -rf build-hive
62+ rm -rf build-honeybee
63+ rm -rf build-base
64+ -find $(CURDIR) -name "*.pyc" -o -name "*.pyo" | xargs rm -f
65
66=== added file 'setup.py'
67--- setup.py 1970-01-01 00:00:00 +0000
68+++ setup.py 2009-01-30 16:30:16 +0000
69@@ -0,0 +1,71 @@
70+#!/usr/bin/env python
71+# Copyright (C) 2007-2009 BeeSeek Developers
72+#
73+# This program is free software: you can redistribute it and/or modify
74+# it under the terms of the GNU Affero General Public License as
75+# published by the Free Software Foundation, either version 3 of the
76+# License, or (at your option) any later version.
77+#
78+# This program is distributed in the hope that it will be useful,
79+# but WITHOUT ANY WARRANTY; without even the implied warranty of
80+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81+# GNU Affero General Public License for more details.
82+#
83+# You should have received a copy of the GNU Affero General Public License
84+# along with this program. If not, see <http://www.gnu.org/licenses/>.
85+
86+import sys
87+if getattr(sys, 'version_info', (1, 6)) < (2, 4):
88+ sys.stderr.write('[ERROR] The BeeSeek software requires Python version '
89+ '2.4 or later to run.\n')
90+ sys.exit(1)
91+
92+
93+from distutils.core import setup
94+import beeseek
95+
96+
97+common_metadata = {
98+ 'version': beeseek.__version__,
99+ 'author': 'BeeSeek Developers',
100+ 'author_email': 'devs@beeseek.org',
101+ 'url': 'http://www.beeseek.org',
102+ }
103+
104+hive_metadata = {
105+ 'name': 'Hive',
106+ 'description': 'BeeSeek Server',
107+ 'packages': ['beeseek.hive'],
108+ 'scripts': ['hive'],
109+ }
110+honeybee_metadata = {
111+ 'name': 'Honeybee',
112+ 'description': 'BeeSeek Peer',
113+ 'packages': ['beeseek.honeybee'],
114+ 'scripts': ['honeybee'],
115+ }
116+baselib_metadata = {
117+ 'name': 'BeeSeek Base',
118+ 'description': 'BeeSeek Base Library',
119+ 'packages': ['beeseek', 'beeseek.database', 'beeseek.decoders',
120+ 'beeseek.network', 'beeseek.tests', 'beeseek.ui',
121+ 'beeseek.utils']
122+ }
123+hive_metadata.update(common_metadata)
124+honeybee_metadata.update(common_metadata)
125+baselib_metadata.update(common_metadata)
126+
127+metadata = {}
128+if 'hive' in sys.argv:
129+ sys.argv.remove('hive')
130+ metadata = hive_metadata
131+elif 'honeybee' in sys.argv:
132+ sys.argv.remove('honeybee')
133+ metadata = honeybee_metadata
134+elif 'base' in sys.argv:
135+ sys.argv.remove('base')
136+ metadata = baselib_metadata
137+else:
138+ sys.stderr.write('[WARNING] No product specified.\n')
139+
140+setup(**metadata)
141

Subscribers

People subscribed via source and target branches