diff options
author | Martin Sivak <msivak@redhat.com> | 2013-01-11 16:00:43 +0100 |
---|---|---|
committer | Martin Sivak <msivak@redhat.com> | 2013-01-11 16:00:43 +0100 |
commit | a8fa17bafddf19366cef8d4feec2974680b92ff0 (patch) | |
tree | 456b893cfffd29ff6f1c78c6dd543b3622a63294 | |
parent | 0ced8a98c4d06665424814733c7a68453f89c753 (diff) | |
download | firstboot2-a8fa17bafddf19366cef8d4feec2974680b92ff0.tar.gz firstboot2-a8fa17bafddf19366cef8d4feec2974680b92ff0.tar.xz firstboot2-a8fa17bafddf19366cef8d4feec2974680b92ff0.zip |
Changes to make the package ready for review
-rw-r--r-- | MANIFEST.in | 6 | ||||
-rw-r--r-- | inital-setup.spec | 36 | ||||
-rw-r--r-- | inital_setup/__init__.py | 0 | ||||
-rw-r--r-- | inital_setup/gui/__main__.py | 5 | ||||
-rw-r--r-- | inital_setup/gui/hubs/inital_setup.py | 5 | ||||
-rw-r--r-- | locale/cs_CZ/LC_MESSAGES/inital-setup.po | 27 | ||||
-rw-r--r-- | locale/inital-setup.pot | 26 | ||||
-rw-r--r-- | setup.py | 23 |
8 files changed, 106 insertions, 22 deletions
diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..960878c --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,6 @@ +include COPYING +recursive-include systemd * +recursive-include scripts * +recursive-include locale *.po *.pot +recursive-include modules *.py *.glade *.txt +recursive-exclude modules *.pyc *.pyo diff --git a/inital-setup.spec b/inital-setup.spec index efafe6e..46f271d 100644 --- a/inital-setup.spec +++ b/inital-setup.spec @@ -1,10 +1,11 @@ -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Summary: Initial system configuration utility Name: inital-setup URL: http://fedoraproject.org/wiki/FirstBoot Version: 0.1 Release: 1%{?dist} +BuildArch: noarch # This is a Red Hat maintained package which is specific to # our distribution. Thus the source is only available from # within this srpm. @@ -14,9 +15,16 @@ License: GPLv2+ Group: System Environment/Base ExclusiveOS: Linux BuildRequires: gettext -BuildRequires: python-devel, python-setuptools-devel +BuildRequires: python2-devel, python-setuptools-devel BuildRequires: systemd-units -Requires: gtk3, python, python-gi +BuildRequires: gtk3-devel +BuildRequires: gtk-doc +BuildRequires: gobject-introspection-devel +BuildRequires: glade-devel +BuildRequires: pygobject3 +BuildRequires: python-babel +Requires: gtk3 +Requires: python Requires: anaconda Requires(post): systemd-units systemd-sysv chkconfig Requires(preun): systemd-units @@ -24,10 +32,10 @@ Requires(postun): systemd-units Requires: firstboot(windowmanager) Requires: libreport-python -%define debug_package %{nil} +%global debug_package %{nil} %description -The firstboot utility runs after installation. It guides the user through +The inital-setup utility runs after installation. It guides the user through a series of steps that allows for easier configuration of the machine. %prep @@ -38,8 +46,11 @@ rm -rf *.egg-info %build %{__python} setup.py build +%{__python} setup.py compile_catalog -D %{name} -d locale %install +rm -rf ${buildroot} + %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT rm -rf ${buildroot}%{python_sitelib}/setuptools/tests %find_lang %{name} @@ -68,16 +79,13 @@ fi %defattr(-,root,root,-) %dir %{_datadir}/inital-setup/ %dir %{_datadir}/inital-setup/modules/ -%dir %{_datadir}/inital-setup/themes/ -%dir %{_datadir}/inital-setup/themes/default %{python_sitelib}/* -%{_sbindir}/inital-setup -%{_datadir}/inital-setup/modules/create_user.py* -%{_datadir}/inital-setup/modules/date.py* -%{_datadir}/inital-setup/modules/eula.py* -%{_datadir}/inital-setup/modules/welcome.py* -%{_datadir}/inital-setup/themes/default/* +%{_bindir}/inital-setup +%{_datadir}/inital-setup/modules/* + /lib/systemd/system/inital-setup-graphical.service +/lib/systemd/system/inital-setup-text.service + %ifarch s390 s390x %dir %{_sysconfdir}/profile.d %{_sysconfdir}/profile.d/inital-setup.sh @@ -86,5 +94,5 @@ fi %changelog -* Tue Nov 06 2012 Martin Sivak <msivak@redhat.com> 19.0-1 +* Tue Nov 06 2012 Martin Sivak <msivak@redhat.com> 0.1-1 - Inital release diff --git a/inital_setup/__init__.py b/inital_setup/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/inital_setup/__init__.py diff --git a/inital_setup/gui/__main__.py b/inital_setup/gui/__main__.py index 1a807cd..288a552 100644 --- a/inital_setup/gui/__main__.py +++ b/inital_setup/gui/__main__.py @@ -9,7 +9,7 @@ for p in os.environ.get("ANACONDA_WIDGETS_OVERRIDES", "").split(":"): # set the root path to / so the imported spokes # know where to apply their changes from pyanaconda.constants import ROOT_PATH -ROOT_PATH= "/" +ROOT_PATH = "/" from pyanaconda.addons import collect_addon_paths @@ -36,3 +36,6 @@ g.setup(data) # Start the application g.run() + +# Print the kickstart file +print data diff --git a/inital_setup/gui/hubs/inital_setup.py b/inital_setup/gui/hubs/inital_setup.py index a0f6dc7..2a59b77 100644 --- a/inital_setup/gui/hubs/inital_setup.py +++ b/inital_setup/gui/hubs/inital_setup.py @@ -36,10 +36,11 @@ class InitalSetupMainHub(Hub): """ ret = {} - + # Collect all the categories this hub displays, then collect all the # spokes belonging to all those categories. - spokes = [spoke for spoke in collect_spokes(self.paths["spokes"]) \ + candidate_spokes = collect_spokes(self.paths["spokes"]) + spokes = [spoke for spoke in candidate_spokes \ if spoke.should_run("firstboot", self.data)] for spoke in spokes: diff --git a/locale/cs_CZ/LC_MESSAGES/inital-setup.po b/locale/cs_CZ/LC_MESSAGES/inital-setup.po new file mode 100644 index 0000000..70661d5 --- /dev/null +++ b/locale/cs_CZ/LC_MESSAGES/inital-setup.po @@ -0,0 +1,27 @@ +# Czech (Czech Republic) translations for inital-setup. +# Copyright (C) 2013 Red Hat +# This file is distributed under the same license as the inital-setup +# project. +# Martin Sivák <msivak@redhat.com>, 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: inital-setup 0.1\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2013-01-11 15:10+0100\n" +"PO-Revision-Date: 2013-01-11 15:12+0100\n" +"Last-Translator: Martin Sivák <msivak@redhat.com>\n" +"Language-Team: cs_CZ <LL@li.org>\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 0.9.6\n" + +#: inital_setup/gui/gui.py:20 +msgid "" +"Are you sure you want to quit the configuration process?\n" +"You might end up with unusable system if you do." +msgstr "Opravdu chcete ukončit konfiguraci?\nSystém může zůstat nepoužitelný, pokud to uděláte." + diff --git a/locale/inital-setup.pot b/locale/inital-setup.pot new file mode 100644 index 0000000..fbea694 --- /dev/null +++ b/locale/inital-setup.pot @@ -0,0 +1,26 @@ +# Translations template for inital-setup. +# Copyright (C) 2013 ORGANIZATION +# This file is distributed under the same license as the inital-setup +# project. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: inital-setup 0.1\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2013-01-11 15:10+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 0.9.6\n" + +#: inital_setup/gui/gui.py:20 +msgid "" +"Are you sure you want to quit the configuration process?\n" +"You might end up with unusable system if you do." +msgstr "" + @@ -21,7 +21,9 @@ # import os -from setuptools import setup +from setuptools import setup, find_packages +from babel.messages import frontend as babel +from glob import * # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level @@ -30,10 +32,15 @@ from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -from glob import * -import os -data_files = [('/lib/systemd/system', glob('systemd/*.service'))] +data_files = [('/lib/systemd/system', glob('systemd/*.service')), + ('/usr/share/inital-setup/modules', glob('modules/*'))] + +# add localization files +data_files += [('/usr/share/locale/%s/LC_MESSAGES' % dirname, + ['locale/%s/LC_MESSAGES/inital-setup.mo' % dirname]) + for dirname in os.listdir("locale") + if not dirname.endswith(".pot")] # add the firstboot start script for s390 architectures if os.uname()[4].startswith('s390'): @@ -49,7 +56,9 @@ setup( url='http://fedoraproject.org/wiki/FirstBoot', license = "GPLv2+", keywords = "firstboot inital setup", - packages = ['inital_setup'], + packages = find_packages(), + scripts = ["inital-setup"], + data_files = data_files, setup_requires= ['nose>=1.0'], test_suite = "inital_setup", long_description=read('README'), @@ -59,4 +68,8 @@ setup( "Topic :: Software Development :: Testing", "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", ], + cmdclass = {'compile_catalog': babel.compile_catalog, + 'extract_messages': babel.extract_messages, + 'init_catalog': babel.init_catalog, + 'update_catalog': babel.update_catalog} ) |