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
=== added file 'Makefile'
--- Makefile 1970-01-01 00:00:00 +0000
+++ Makefile 2009-01-30 17:34:49 +0000
@@ -0,0 +1,60 @@
1# Copyright (C) 2007-2009 BeeSeek Developers
2#
3# This program is free software: you can redistribute it and/or modify
4# it under the terms of the GNU Affero General Public License as
5# published by the Free Software Foundation, either version 3 of the
6# License, or (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Affero General Public License for more details.
12#
13# You should have received a copy of the GNU Affero General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16PYTHON=/usr/bin/python
17
18all: build-all
19build: build-all
20build-all: build-hive build-honeybee build-base
21
22build-hive:
23 $(PYTHON) setup.py build hive
24 mv $(CURDIR)/build $(CURDIR)/build-hive
25build-honeybee:
26 $(PYTHON) setup.py build honeybee
27 mv $(CURDIR)/build $(CURDIR)/build-honeybee
28build-base:
29 $(PYTHON) setup.py build base
30 mv $(CURDIR)/build $(CURDIR)/build-base
31
32install: install-all
33install-all: install-hive install-honeybee install-base
34
35install-hive:
36 $(PYTHON) setup.py install hive
37install-honeybee:
38 $(PYTHON) setup.py install honeybee
39install-base:
40 $(PYTHON) setup.py install base
41
42
43pychecker:
44 find beeseek -name "*.py" | xargs pychecker --limit=100000
45
46pyflakes:
47 pyflakes beeseek
48
49pylint:
50 pylint -f parseable --max-line-length 78 beeseek
51
52xxxreport:
53 pylint -f parseable -r no --enable-checker miscellaneous beeseek
54
55
56clean:
57 rm -rf build-hive
58 rm -rf build-honeybee
59 rm -rf build-base
60 -find $(CURDIR) -name "*.pyc" -o -name "*.pyo" | xargs rm -f
061
=== added file 'setup.py'
--- setup.py 1970-01-01 00:00:00 +0000
+++ setup.py 2009-01-30 16:30:16 +0000
@@ -0,0 +1,71 @@
1#!/usr/bin/env python
2# Copyright (C) 2007-2009 BeeSeek Developers
3#
4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU Affero General Public License as
6# published by the Free Software Foundation, either version 3 of the
7# License, or (at your option) any later version.
8#
9# This program 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
12# GNU Affero General Public License for more details.
13#
14# You should have received a copy of the GNU Affero General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17import sys
18if getattr(sys, 'version_info', (1, 6)) < (2, 4):
19 sys.stderr.write('[ERROR] The BeeSeek software requires Python version '
20 '2.4 or later to run.\n')
21 sys.exit(1)
22
23
24from distutils.core import setup
25import beeseek
26
27
28common_metadata = {
29 'version': beeseek.__version__,
30 'author': 'BeeSeek Developers',
31 'author_email': 'devs@beeseek.org',
32 'url': 'http://www.beeseek.org',
33 }
34
35hive_metadata = {
36 'name': 'Hive',
37 'description': 'BeeSeek Server',
38 'packages': ['beeseek.hive'],
39 'scripts': ['hive'],
40 }
41honeybee_metadata = {
42 'name': 'Honeybee',
43 'description': 'BeeSeek Peer',
44 'packages': ['beeseek.honeybee'],
45 'scripts': ['honeybee'],
46 }
47baselib_metadata = {
48 'name': 'BeeSeek Base',
49 'description': 'BeeSeek Base Library',
50 'packages': ['beeseek', 'beeseek.database', 'beeseek.decoders',
51 'beeseek.network', 'beeseek.tests', 'beeseek.ui',
52 'beeseek.utils']
53 }
54hive_metadata.update(common_metadata)
55honeybee_metadata.update(common_metadata)
56baselib_metadata.update(common_metadata)
57
58metadata = {}
59if 'hive' in sys.argv:
60 sys.argv.remove('hive')
61 metadata = hive_metadata
62elif 'honeybee' in sys.argv:
63 sys.argv.remove('honeybee')
64 metadata = honeybee_metadata
65elif 'base' in sys.argv:
66 sys.argv.remove('base')
67 metadata = baselib_metadata
68else:
69 sys.stderr.write('[WARNING] No product specified.\n')
70
71setup(**metadata)
072

Subscribers

People subscribed via source and target branches