From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 62B30138247 for ; Thu, 21 Nov 2013 09:06:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3DC81E0A44; Thu, 21 Nov 2013 09:06:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 07128E0A40 for ; Thu, 21 Nov 2013 09:06:37 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2642B33F310 for ; Thu, 21 Nov 2013 09:06:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id A948AE54D9 for ; Thu, 21 Nov 2013 09:06:33 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1385024411.256b30d346c7609839932a78744590299eb4a7ac.dol-sen@gentoo> Subject: [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/, / X-VCS-Repository: proj/catalyst X-VCS-Files: .gitignore MANIFEST.in catalyst/__init__.py setup.py X-VCS-Directories: catalyst/ / X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 256b30d346c7609839932a78744590299eb4a7ac X-VCS-Branch: 3.0 Date: Thu, 21 Nov 2013 09:06:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 4a635d8c-fb74-495f-b95e-10fe785f8031 X-Archives-Hash: 30016c81f58bdc1936b36ac0cbd2a44f commit: 256b30d346c7609839932a78744590299eb4a7ac Author: W. Trevor King tremily us> AuthorDate: Wed Jun 5 17:13:43 2013 +0000 Commit: Brian Dolbec gmail com> CommitDate: Thu Nov 21 09:00:11 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=256b30d3 setup.py: Add disutils-based packaging Package catalyst in the usual manner for Python projects. Now it is ready for PyPI :). I also expose the version string in catalyst.__version__, since that's a more traditional location than catalyst.version.__version__. --- .gitignore | 7 ++++- MANIFEST.in | 6 ++++ catalyst/__init__.py | 3 ++ setup.py | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 711f9e8..0cf4f26 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,10 @@ *.py[co] + +build +dist +files +MANIFEST + test.* *.geany Scratch - diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..4274094 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,6 @@ +include AUTHORS +include ChangeLog +include COPYING +include Makefile +recursive-include doc *.conf *.py HOWTO.txt catalyst*.txt +recursive-include examples README *.example *.spec diff --git a/catalyst/__init__.py b/catalyst/__init__.py index e69de29..c2538aa 100644 --- a/catalyst/__init__.py +++ b/catalyst/__init__.py @@ -0,0 +1,3 @@ +"Catalyst is a release building tool used by Gentoo Linux" + +from .version import __version__ diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..34eae53 --- /dev/null +++ b/setup.py @@ -0,0 +1,89 @@ +# Copyright (C) 2013 W. Trevor King +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +"Catalyst is a release building tool used by Gentoo Linux" + +import codecs as _codecs +from distutils.core import setup as _setup +import itertools as _itertools +import os as _os + +from catalyst import __version__ + + +_this_dir = _os.path.dirname(__file__) +package_name = 'catalyst' +tag = '{0}-{1}'.format(package_name, __version__) + + +def files(root): + """Iterate through all the file paths under `root` + + Distutils wants all paths to be written in the Unix convention + (i.e. slash-separated) [1], so that's what we'll do here. + + [1]: http://docs.python.org/2/distutils/setupscript.html#writing-the-setup-script + """ + for dirpath, dirnames, filenames in _os.walk(root): + for filename in filenames: + path = _os.path.join(dirpath, filename) + if _os.path.sep != '/': + path = path.replace(_os.path.sep, '/') + yield path + + +_setup( + name=package_name, + version=__version__, + maintainer='Gentoo Release Engineering', + maintainer_email='releng@gentoo.org', + url='http://www.gentoo.org/proj/en/releng/{0}/'.format(package_name), + download_url='http://git.overlays.gentoo.org/gitweb/?p=proj/{0}.git;a=snapshot;h={1};sf=tgz'.format(package_name, tag), + license='GNU General Public License (GPL)', + platforms=['all'], + description=__doc__, + long_description=_codecs.open( + _os.path.join(_this_dir, 'README'), 'r', 'utf-8').read(), + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)', + 'Intended Audience :: System Administrators', + 'Operating System :: POSIX', + 'Topic :: System :: Archiving :: Packaging', + 'Topic :: System :: Installation/Setup', + 'Topic :: System :: Software Distribution', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', + ], + scripts=['bin/{0}'.format(package_name)], + packages=[ + package_name, + '{0}.arch'.format(package_name), + '{0}.base'.format(package_name), + '{0}.targets'.format(package_name), + ], + data_files=[ + ('/etc/catalyst', [ + 'etc/catalyst.conf', + 'etc/catalystrc', + ]), + ('lib/catalyst/', list(_itertools.chain( + files('livecd'), + files('targets'), + ))), + ], + provides=[package_name], + )