← Back to team overview

beeseek-devs team mailing list archive

[Branch ~beeseek-devs/beeseek/trunk] Rev 207: Add a Makefile.

 

------------------------------------------------------------
revno: 207
committer: Andrea Corbellini <andrea.corbellini@xxxxxxxxxxx>
branch nick: trunk
timestamp: Mon 2009-02-02 20:52:14 +0100
message:
  Add a Makefile.
  
  Users can now build and install all the software in the branch.
  The setup.py script builds the base library, the peer and the server 
  separately.
  
  Developers can also use the makefile to generate lists of XXX, TODO and 
  FIXME comments located in the code. There are some shortcuts for 
  pychecker, pyflakes and pylint too.
added:
  Makefile
  setup.py
    ------------------------------------------------------------
    revno: 205.2.7
    committer: Andrea Corbellini <andrea.corbellini@xxxxxxxxxxx>
    branch nick: makefile
    timestamp: Fri 2009-01-30 18:34:49 +0100
    message:
      Add install.
    modified:
      Makefile
    ------------------------------------------------------------
    revno: 205.2.6
    committer: Andrea Corbellini <andrea.corbellini@xxxxxxxxxxx>
    branch nick: makefile
    timestamp: Fri 2009-01-30 18:25:50 +0100
    message:
      Generate XXX reports.
    modified:
      Makefile
    ------------------------------------------------------------
    revno: 205.2.5
    committer: Andrea Corbellini <andrea.corbellini@xxxxxxxxxxx>
    branch nick: makefile
    timestamp: Fri 2009-01-30 17:45:03 +0100
    message:
      Add checks with pychecker, pyflakes and pylint.
    modified:
      Makefile
    ------------------------------------------------------------
    revno: 205.2.4
    committer: Andrea Corbellini <andrea.corbellini@xxxxxxxxxxx>
    branch nick: makefile
    timestamp: Fri 2009-01-30 17:30:50 +0100
    message:
      Add Makefile.
    added:
      Makefile
    modified:
      .bzrignore
    ------------------------------------------------------------
    revno: 205.2.3
    committer: Andrea Corbellini <andrea.corbellini@xxxxxxxxxxx>
    branch nick: makefile
    timestamp: Fri 2009-01-30 17:30:16 +0100
    message:
      Build base lib separately.
    modified:
      setup.py
    ------------------------------------------------------------
    revno: 205.2.2
    committer: Andrea Corbellini <andrea.corbellini@xxxxxxxxxxx>
    branch nick: makefile
    timestamp: Fri 2009-01-30 14:48:44 +0100
    message:
      Add license.
    modified:
      setup.py
    ------------------------------------------------------------
    revno: 205.2.1
    committer: Andrea Corbellini <andrea.corbellini@xxxxxxxxxxx>
    branch nick: makefile
    timestamp: Fri 2009-01-30 14:47:30 +0100
    message:
      Add setup.py script to build and install Python scripts and libs.
    added:
      setup.py
    modified:
      .bzrignore

=== added file 'Makefile'
--- Makefile	1970-01-01 00:00:00 +0000
+++ Makefile	2009-01-30 17:34:49 +0000
@@ -0,0 +1,60 @@
+# Copyright (C) 2007-2009  BeeSeek Developers
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+PYTHON=/usr/bin/python
+
+all: build-all
+build: build-all
+build-all: build-hive build-honeybee build-base
+
+build-hive:
+	$(PYTHON) setup.py build hive
+	mv $(CURDIR)/build $(CURDIR)/build-hive
+build-honeybee:
+	$(PYTHON) setup.py build honeybee
+	mv $(CURDIR)/build $(CURDIR)/build-honeybee
+build-base:
+	$(PYTHON) setup.py build base
+	mv $(CURDIR)/build $(CURDIR)/build-base
+
+install: install-all
+install-all: install-hive install-honeybee install-base
+
+install-hive:
+	$(PYTHON) setup.py install hive
+install-honeybee:
+	$(PYTHON) setup.py install honeybee
+install-base:
+	$(PYTHON) setup.py install base
+
+
+pychecker:
+	find beeseek -name "*.py" | xargs pychecker --limit=100000
+
+pyflakes:
+	pyflakes beeseek
+
+pylint:
+	pylint -f parseable --max-line-length 78 beeseek
+
+xxxreport:
+	pylint -f parseable -r no --enable-checker miscellaneous beeseek
+
+
+clean:
+	rm -rf build-hive
+	rm -rf build-honeybee
+	rm -rf build-base
+	-find $(CURDIR) -name "*.pyc" -o -name "*.pyo" | xargs rm -f

=== 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 @@
+#!/usr/bin/env python
+# Copyright (C) 2007-2009  BeeSeek Developers
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+import sys
+if getattr(sys, 'version_info', (1, 6)) < (2, 4):
+    sys.stderr.write('[ERROR] The BeeSeek software requires Python version '
+                     '2.4 or later to run.\n')
+    sys.exit(1)
+
+
+from distutils.core import setup
+import beeseek
+
+
+common_metadata = {
+    'version': beeseek.__version__,
+    'author': 'BeeSeek Developers',
+    'author_email': 'devs@xxxxxxxxxxx',
+    'url': 'http://www.beeseek.org',
+    }
+
+hive_metadata = {
+    'name': 'Hive',
+    'description': 'BeeSeek Server',
+    'packages': ['beeseek.hive'],
+    'scripts': ['hive'],
+    }
+honeybee_metadata = {
+    'name': 'Honeybee',
+    'description': 'BeeSeek Peer',
+    'packages': ['beeseek.honeybee'],
+    'scripts': ['honeybee'],
+    }
+baselib_metadata = {
+    'name': 'BeeSeek Base',
+    'description': 'BeeSeek Base Library',
+    'packages': ['beeseek', 'beeseek.database', 'beeseek.decoders',
+                 'beeseek.network', 'beeseek.tests', 'beeseek.ui',
+                 'beeseek.utils']
+    }
+hive_metadata.update(common_metadata)
+honeybee_metadata.update(common_metadata)
+baselib_metadata.update(common_metadata)
+
+metadata = {}
+if 'hive' in sys.argv:
+    sys.argv.remove('hive')
+    metadata = hive_metadata
+elif 'honeybee' in sys.argv:
+    sys.argv.remove('honeybee')
+    metadata = honeybee_metadata
+elif 'base' in sys.argv:
+    sys.argv.remove('base')
+    metadata = baselib_metadata
+else:
+    sys.stderr.write('[WARNING] No product specified.\n')
+
+setup(**metadata)



--
BeeSeek mainline
https://code.launchpad.net/~beeseek-devs/beeseek/trunk

Your team BeeSeek Developers is subscribed to branch lp:beeseek.
To unsubscribe from this branch go to https://code.launchpad.net/~beeseek-devs/beeseek/trunk/+edit-subscription.