[fedocal] master: Remove old html file (9a05793)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 9a057934abe70f21944f0c66ad49997f6757df5a
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Fri Mar 15 18:08:50 2013 +0100
Remove old html file
>---------------------------------------------------------------
doc/dep.html | 388 ----------------------------------------------------------
1 files changed, 0 insertions(+), 388 deletions(-)
diff --git a/doc/dep.html b/doc/dep.html
deleted file mode 100644
index af12dc1..0000000
--- a/doc/dep.html
+++ /dev/null
@@ -1,388 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.8.1: http://docutils.sourceforge.net/" />
-<title></title>
-<style type="text/css">
-
-/*
-:Author: David Goodger (goodger(a)python.org)
-:Id: $Id: html4css1.css 7056 2011-06-17 10:50:48Z milde $
-:Copyright: This stylesheet has been placed in the public domain.
-
-Default cascading style sheet for the HTML output of Docutils.
-
-See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
-customize this style sheet.
-*/
-
-/* used to remove borders from tables and images */
-.borderless, table.borderless td, table.borderless th {
- border: 0 }
-
-table.borderless td, table.borderless th {
- /* Override padding for "table.docutils td" with "! important".
- The right padding separates the table cells. */
- padding: 0 0.5em 0 0 ! important }
-
-.first {
- /* Override more specific margin styles with "! important". */
- margin-top: 0 ! important }
-
-.last, .with-subtitle {
- margin-bottom: 0 ! important }
-
-.hidden {
- display: none }
-
-a.toc-backref {
- text-decoration: none ;
- color: black }
-
-blockquote.epigraph {
- margin: 2em 5em ; }
-
-dl.docutils dd {
- margin-bottom: 0.5em }
-
-object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
- overflow: hidden;
-}
-
-/* Uncomment (and remove this text!) to get bold-faced definition list terms
-dl.docutils dt {
- font-weight: bold }
-*/
-
-div.abstract {
- margin: 2em 5em }
-
-div.abstract p.topic-title {
- font-weight: bold ;
- text-align: center }
-
-div.admonition, div.attention, div.caution, div.danger, div.error,
-div.hint, div.important, div.note, div.tip, div.warning {
- margin: 2em ;
- border: medium outset ;
- padding: 1em }
-
-div.admonition p.admonition-title, div.hint p.admonition-title,
-div.important p.admonition-title, div.note p.admonition-title,
-div.tip p.admonition-title {
- font-weight: bold ;
- font-family: sans-serif }
-
-div.attention p.admonition-title, div.caution p.admonition-title,
-div.danger p.admonition-title, div.error p.admonition-title,
-div.warning p.admonition-title {
- color: red ;
- font-weight: bold ;
- font-family: sans-serif }
-
-/* Uncomment (and remove this text!) to get reduced vertical space in
- compound paragraphs.
-div.compound .compound-first, div.compound .compound-middle {
- margin-bottom: 0.5em }
-
-div.compound .compound-last, div.compound .compound-middle {
- margin-top: 0.5em }
-*/
-
-div.dedication {
- margin: 2em 5em ;
- text-align: center ;
- font-style: italic }
-
-div.dedication p.topic-title {
- font-weight: bold ;
- font-style: normal }
-
-div.figure {
- margin-left: 2em ;
- margin-right: 2em }
-
-div.footer, div.header {
- clear: both;
- font-size: smaller }
-
-div.line-block {
- display: block ;
- margin-top: 1em ;
- margin-bottom: 1em }
-
-div.line-block div.line-block {
- margin-top: 0 ;
- margin-bottom: 0 ;
- margin-left: 1.5em }
-
-div.sidebar {
- margin: 0 0 0.5em 1em ;
- border: medium outset ;
- padding: 1em ;
- background-color: #ffffee ;
- width: 40% ;
- float: right ;
- clear: right }
-
-div.sidebar p.rubric {
- font-family: sans-serif ;
- font-size: medium }
-
-div.system-messages {
- margin: 5em }
-
-div.system-messages h1 {
- color: red }
-
-div.system-message {
- border: medium outset ;
- padding: 1em }
-
-div.system-message p.system-message-title {
- color: red ;
- font-weight: bold }
-
-div.topic {
- margin: 2em }
-
-h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
-h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
- margin-top: 0.4em }
-
-h1.title {
- text-align: center }
-
-h2.subtitle {
- text-align: center }
-
-hr.docutils {
- width: 75% }
-
-img.align-left, .figure.align-left, object.align-left {
- clear: left ;
- float: left ;
- margin-right: 1em }
-
-img.align-right, .figure.align-right, object.align-right {
- clear: right ;
- float: right ;
- margin-left: 1em }
-
-img.align-center, .figure.align-center, object.align-center {
- display: block;
- margin-left: auto;
- margin-right: auto;
-}
-
-.align-left {
- text-align: left }
-
-.align-center {
- clear: both ;
- text-align: center }
-
-.align-right {
- text-align: right }
-
-/* reset inner alignment in figures */
-div.align-right {
- text-align: inherit }
-
-/* div.align-center * { */
-/* text-align: left } */
-
-ol.simple, ul.simple {
- margin-bottom: 1em }
-
-ol.arabic {
- list-style: decimal }
-
-ol.loweralpha {
- list-style: lower-alpha }
-
-ol.upperalpha {
- list-style: upper-alpha }
-
-ol.lowerroman {
- list-style: lower-roman }
-
-ol.upperroman {
- list-style: upper-roman }
-
-p.attribution {
- text-align: right ;
- margin-left: 50% }
-
-p.caption {
- font-style: italic }
-
-p.credits {
- font-style: italic ;
- font-size: smaller }
-
-p.label {
- white-space: nowrap }
-
-p.rubric {
- font-weight: bold ;
- font-size: larger ;
- color: maroon ;
- text-align: center }
-
-p.sidebar-title {
- font-family: sans-serif ;
- font-weight: bold ;
- font-size: larger }
-
-p.sidebar-subtitle {
- font-family: sans-serif ;
- font-weight: bold }
-
-p.topic-title {
- font-weight: bold }
-
-pre.address {
- margin-bottom: 0 ;
- margin-top: 0 ;
- font: inherit }
-
-pre.literal-block, pre.doctest-block, pre.math {
- margin-left: 2em ;
- margin-right: 2em }
-
-span.classifier {
- font-family: sans-serif ;
- font-style: oblique }
-
-span.classifier-delimiter {
- font-family: sans-serif ;
- font-weight: bold }
-
-span.interpreted {
- font-family: sans-serif }
-
-span.option {
- white-space: nowrap }
-
-span.pre {
- white-space: pre }
-
-span.problematic {
- color: red }
-
-span.section-subtitle {
- /* font-size relative to parent (h1..h6 element) */
- font-size: 80% }
-
-table.citation {
- border-left: solid 1px gray;
- margin-left: 1px }
-
-table.docinfo {
- margin: 2em 4em }
-
-table.docutils {
- margin-top: 0.5em ;
- margin-bottom: 0.5em }
-
-table.footnote {
- border-left: solid 1px black;
- margin-left: 1px }
-
-table.docutils td, table.docutils th,
-table.docinfo td, table.docinfo th {
- padding-left: 0.5em ;
- padding-right: 0.5em ;
- vertical-align: top }
-
-table.docutils th.field-name, table.docinfo th.docinfo-name {
- font-weight: bold ;
- text-align: left ;
- white-space: nowrap ;
- padding-left: 0 }
-
-h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
-h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
- font-size: 100% }
-
-ul.auto-toc {
- list-style-type: none }
-
-</style>
-</head>
-<body>
-<div class="document">
-
-
-<div class="section" id="deployment">
-<h1>Deployment</h1>
-</div>
-<div class="section" id="from-sources">
-<h1>From sources</h1>
-<p>Clone the source:</p>
-<pre class="literal-block">
-git clone https://github.com/pypingou/fedocal.git
-</pre>
-<p>Copy the configuration file:</p>
-<pre class="literal-block">
-cp fedocal.cfg.sample fedocal.cfg
-</pre>
-<p>Adjust the configuration file (secret key, database URL, admin group...).
-See doc:<a href="#id1"><span class="problematic" id="id2">`configuration`_</span></a> for detailed information about the configuration.</p>
-<p>Create the database scheme:</p>
-<pre class="literal-block">
-python fedocal/fedocallib/model.py
-</pre>
-</div>
-<div class="section" id="from-system-wide-packages">
-<h1>From system-wide packages</h1>
-</div>
-<div class="section" id="set-up-wsgi">
-<h1>Set-up WSGI</h1>
-<p>Start by installing <tt class="docutils literal">mod_wsgi</tt>:</p>
-<pre class="literal-block">
-yum install mod_wsgi
-</pre>
-<p>Then configure apache:</p>
-<pre class="literal-block">
-sudo vim /etc/httd/conf.d/wsgi.conf
-</pre>
-<p>and put in this file:</p>
-<pre class="literal-block">
-WSGIScriptAlias /fedocal /var/www/wsgi/fedocal.wsgi
-<Directory /var/www/wsgi/>
- Order deny,allow
- Allow from all
-</Directory>
-</pre>
-<p>Then create the file /var/www/wsgi/fedocal.wsgi with:</p>
-<pre class="literal-block">
-import fedocal
-application = fedocal.APP
-</pre>
-<!-- note: If you run form the sources, you might have to add at the
-top of the file ::
-
- import sys
- sys.path.insert(0, '/srv/fedocal/') -->
-<p>Then restart apache and you should be able to access the website on
-<a class="reference external" href="http://localhost/fedocal">http://localhost/fedocal</a></p>
-<p>Then restart apache and you should be able to access the website on
-<a class="reference external" href="http://localhost/fedocal">http://localhost/fedocal</a></p>
-</div>
-<div class="section" id="for-testing">
-<h1>For testing</h1>
-<p>See doc:<cite>development</cite> if you want to run fedocal just to test it.</p>
-</div>
-<div class="system-messages section">
-<h1>Docutils System Messages</h1>
-<div class="system-message" id="id1">
-<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">deployment.rst</tt>, line 16); <em><a href="#id2">backlink</a></em></p>
-Unknown target name: "configuration".</div>
-</div>
-</div>
-</body>
-</html>
11 years
[fedocal] master: Bump release number to prepare release (81209f6)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 81209f6b15c0c197e73396322ba195baf28b189c
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Fri Mar 15 18:06:31 2013 +0100
Bump release number to prepare release
>---------------------------------------------------------------
fedocal/__init__.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fedocal/__init__.py b/fedocal/__init__.py
index af88856..45d9f75 100644
--- a/fedocal/__init__.py
+++ b/fedocal/__init__.py
@@ -27,7 +27,7 @@
__requires__ = ['SQLAlchemy >= 0.7', 'jinja2 >= 2.4']
import pkg_resources
-__version__ = '0.1.0'
+__version__ = '0.1.1'
import datetime
import flask
11 years
[fedocal] master: Backport spec changes from the fedora repo and prepare release 0.1.1 (a6df44b)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit a6df44bb1200bd70f400a96ac6b33e798c70048e
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Fri Mar 15 18:06:04 2013 +0100
Backport spec changes from the fedora repo and prepare release 0.1.1
>---------------------------------------------------------------
fedocal.spec | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/fedocal.spec b/fedocal.spec
index 0e09404..c6d9052 100644
--- a/fedocal.spec
+++ b/fedocal.spec
@@ -2,7 +2,7 @@
%distutils.sysconfig import get_python_lib; print (get_python_lib())")}
Name: fedocal
-Version: 0.1.0
+Version: 0.1.1
Release: 2%{?dist}
Summary: A web based calendar application
@@ -26,6 +26,15 @@ BuildRequires: python-alembic
BuildRequires: python-dateutil <= 1.5
BuildRequires: python-setuptools
+# EPEL6
+%if ( 0%{?rhel} && 0%{?rhel} == 6 )
+BuildRequires: python-sqlalchemy0.7
+Requires: python-sqlalchemy0.7
+%else
+BuildRequires: python-sqlalchemy > 0.5
+Requires: python-sqlalchemy > 0.5
+%endif
+
Requires: python-flask
Requires: python-sqlalchemy
Requires: pytz
@@ -49,8 +58,6 @@ most calendar application.
%prep
%setup -q
-rm fedocal/flask_fas.py
-
%build
%{__python} setup.py build
@@ -71,6 +78,7 @@ install -m 644 alembic.ini.sample $RPM_BUILD_ROOT/%{_sysconfdir}/fedocal/alembic
%files
%doc README.rst LICENSE doc/
+%doc createdb.py
%config(noreplace) %{_sysconfdir}/httpd/conf.d/fedocal.conf
%config(noreplace) %{_sysconfdir}/fedocal/fedocal.cfg
%dir %{_sysconfdir}/fedocal/
@@ -80,6 +88,15 @@ install -m 644 alembic.ini.sample $RPM_BUILD_ROOT/%{_sysconfdir}/fedocal/alembic
%changelog
+* Fri Mar 15 2013 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 0.1.1.-1
+- Update to 0.1.1
+- Include the createdb.py script as %%doc
+- Add the alembic.ini into /etc/fedocal
+
+* Fri Mar 08 2013 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 0.1.0-3
+- Fix import of flask-fas which fixes build on EL6
+- Fix Requires and BuilRequires for EL6
+
* Tue Feb 26 2013 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 0.1.0-2
- Fix BR to python2-devel
- Be more specific on the %%{python_sitelib} inclusion in %%files
11 years
[fedocal] master: Update documentation (b7f6dff)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit b7f6dffc5fe2d7c0ca64676d7055702e7f035afb
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Fri Mar 15 08:31:39 2013 +0100
Update documentation
>---------------------------------------------------------------
doc/configuration.rst | 7 +++++-
doc/deployment.rst | 57 ++++++++++++++----------------------------------
2 files changed, 23 insertions(+), 41 deletions(-)
diff --git a/doc/configuration.rst b/doc/configuration.rst
index 83e45d0..4208609 100644
--- a/doc/configuration.rst
+++ b/doc/configuration.rst
@@ -1,7 +1,8 @@
Configuration
=============
-There are three main configuration options to set to have fedocal running
+There are the main configuration options to set to have fedocal running.
+These options are all present and described in the fedocal.cfg file.
The secret key
---------------
@@ -34,6 +35,10 @@ Examples URLs are::
DB_URL=sqlite:////full/path/to/database.sqlite
+.. note:: The key ``sqlalchemy.url`` of the ``alembic.ini`` file should
+ have the same value as the ``DB_URL`` described here.
+
+
The admin group
----------------
diff --git a/doc/deployment.rst b/doc/deployment.rst
index 511a5dc..19cf05f 100644
--- a/doc/deployment.rst
+++ b/doc/deployment.rst
@@ -9,17 +9,22 @@ Clone the source::
git clone http://git.fedorahosted.org/git/fedocal.git
-Copy the configuration file::
+Copy the configuration files::
cp fedocal.cfg.sample fedocal.cfg
+ cp alembic.ini.sample alembic.ini
-Adjust the configuration file (secret key, database URL, admin group...).
+Adjust the configuration files (secret key, database URL, admin group...).
See :doc:`configuration` for detailed information about the configuration.
Create the database scheme::
- python fedocal/fedocallib/model.py
+ sh createdb
+
+or::
+
+ FEDOCAL_CONFIG=/path/to/fedocal.cfg python createdb.py
Set up the WSGI as described below.
@@ -31,13 +36,9 @@ Start by install fedocal::
yum install fedocal
-Find the sample configuration file::
-
- rpm -ql fedocal |grep fedocal.cfg.sample
-
-Copy this file into (for example) ``/etc/`` with the name ``fedocal.cfg``::
-
- cp /path/to/fedocal.cfg.sample /etc/fedocal.cfg
+Adjust the configuration files: ``/etc/fedocal/fedocaf.cfg`` and
+``/etc/fedocal/alembic.ini``.
+See :doc:`configuration` for detailed information about the configuration.
Find the file used to create the database::
@@ -45,7 +46,7 @@ Find the file used to create the database::
Create the database scheme::
- FEDOCAL_CONFIG=/etc/fedocal/cfg python path/to/createdb.py
+ FEDOCAL_CONFIG=/etc/fedocal/fedocal.cfg python path/to/createdb.py
Set up the WSGI as described below.
@@ -60,36 +61,13 @@ Start by installing ``mod_wsgi``::
Then configure apache::
- sudo vim /etc/httd/conf.d/wsgi.conf
-
-and put in this file::
-
- WSGIScriptAlias /fedocal /var/www/wsgi/fedocal.wsgi
- <Directory /var/www/wsgi/>
- Order deny,allow
- Allow from all
- </Directory>
+ sudo vim /etc/httd/conf.d/fedocal.conf
+uncomment the content of the file and adjust as desired.
-Then create the file /var/www/wsgi/fedocal.wsgi with::
- import os
- os.environ['FEDOCAL_CONFIG'] = '/etc/fedocal.cfg'
-
- import fedocal
- application = fedocal.APP
-
-.. note:: If you run form the sources, you might have to add at the
- top of the file ::
-
- import sys
- sys.path.insert(0, '/srv/fedocal/')
-
- Adapt the path to your configuration
-
-
-.. seealso:: Within the sources of fedocal is a ``fedocal.wsgi`` which
- can be used as a template for your own wsgi.
+Then edit the file ``/usr/lib/python2.*/site-packages/fedocal/`` and
+adjust as needed.
Then restart apache and you should be able to access the website on
@@ -120,8 +98,7 @@ Example of the cron job:
::
- */30 * * * * FEDOCAL_CONFIG=/etc/fedocal.cfg python /path/to/fedocal_cron.py
-
+ */30 * * * * FEDOCAL_CONFIG=/etc/fedocal/fedocal.cfg /usr/bin/fedocal_cron.py
11 years
[fedocal] master: Update the default location of the alembic.ini file (e3d8975)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit e3d897504bf655488c45779557dc40c8d13b0f52
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Mar 14 23:22:50 2013 +0100
Update the default location of the alembic.ini file
>---------------------------------------------------------------
fedocal.cfg.sample | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fedocal.cfg.sample b/fedocal.cfg.sample
index cf084b6..eb4a10b 100644
--- a/fedocal.cfg.sample
+++ b/fedocal.cfg.sample
@@ -26,4 +26,4 @@ CRON_FREQUENCY=30
### When creating the database, we need to tell the database which
### revision of alembic we are at and to do this we need access to the
### alembic.ini file.
-PATH_ALEMBIC_INI='/path/to/alembic.ini'
+PATH_ALEMBIC_INI='/etc/fedocal/alembic.ini'
11 years
[fedocal] master: Include and install the alembic.ini.sample file (2c4cb86)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 2c4cb865b45ef02ba20f19927be183bc3adec510
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Mar 14 23:22:04 2013 +0100
Include and install the alembic.ini.sample file
>---------------------------------------------------------------
MANIFEST.in | 2 +-
fedocal.spec | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/MANIFEST.in b/MANIFEST.in
index bacfd1a..1487526 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,5 +1,5 @@
include LICENSE README.rst *.sample requirements.txt
-include fedocal.spec fedocal.wsgi fedocal.conf
+include fedocal.spec fedocal.wsgi fedocal.conf alembic.ini.sample
include run_tests.sh createdb createdb.py
recursive-include alembic *
recursive-include fedocal *
diff --git a/fedocal.spec b/fedocal.spec
index fdf585b..0e09404 100644
--- a/fedocal.spec
+++ b/fedocal.spec
@@ -67,7 +67,7 @@ install -m 644 fedocal.wsgi $RPM_BUILD_ROOT/%{python_sitelib}/fedocal/fedocal.ws
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/fedocal
install -m 644 fedocal.cfg.sample $RPM_BUILD_ROOT/%{_sysconfdir}/fedocal/fedocal.cfg
-
+install -m 644 alembic.ini.sample $RPM_BUILD_ROOT/%{_sysconfdir}/fedocal/alembic.ini
%files
%doc README.rst LICENSE doc/
11 years
[fedocal] master: Add the cron script and install it (be2a766)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit be2a76659bf7dfc6322d48846c83d26911242b76
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Mar 14 23:11:27 2013 +0100
Add the cron script and install it
>---------------------------------------------------------------
fedocal.spec | 1 +
setup.py | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fedocal.spec b/fedocal.spec
index a0ee035..fdf585b 100644
--- a/fedocal.spec
+++ b/fedocal.spec
@@ -76,6 +76,7 @@ install -m 644 fedocal.cfg.sample $RPM_BUILD_ROOT/%{_sysconfdir}/fedocal/fedocal
%dir %{_sysconfdir}/fedocal/
%{python_sitelib}/fedocal/
%{python_sitelib}/fedocal*.egg-info
+%{_bindir}/fedocal_cron.py
%changelog
diff --git a/setup.py b/setup.py
index 6bf3dca..159f1b0 100644
--- a/setup.py
+++ b/setup.py
@@ -25,6 +25,7 @@ setup(
url = 'https://fedorahosted.org/fedocal/',
packages=['fedocal'],
include_package_data=True,
+ scripts=['fedocal_cron.py'],
install_requires=['Flask', 'SQLAlchemy>=0.6', 'wtforms', 'flask-wtf',
'vobject', 'kitchen', 'python-fedora', 'pytz', 'python-dateutil<=1.5',
'alembic'],
11 years
[fedocal] master: Fix installation of the package data (1dd4eb6)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 1dd4eb63040c64755635853062b0c05963f2835a
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Mar 14 23:07:57 2013 +0100
Fix installation of the package data
>---------------------------------------------------------------
setup.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/setup.py b/setup.py
index c50776c..6bf3dca 100644
--- a/setup.py
+++ b/setup.py
@@ -11,6 +11,7 @@ import pkg_resources
from setuptools import setup
from fedocal import __version__
+
setup(
name = 'fedocal',
description = 'fedocal is a web based calendar application for Fedora.',
@@ -22,7 +23,8 @@ setup(
license = 'GPLv3+',
download_url = 'https://fedorahosted.org/releases/f/e/fedocal/',
url = 'https://fedorahosted.org/fedocal/',
- packages=['fedocal'],
+ packages=['fedocal'],
+ include_package_data=True,
install_requires=['Flask', 'SQLAlchemy>=0.6', 'wtforms', 'flask-wtf',
'vobject', 'kitchen', 'python-fedora', 'pytz', 'python-dateutil<=1.5',
'alembic'],
11 years
[fedocal] master: Fix EL6 build by adjusting the setup.py (e30a217)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit e30a217b12eddc4b68807c113f80628fcb5f9483
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Mon Mar 11 20:58:41 2013 +0100
Fix EL6 build by adjusting the setup.py
>---------------------------------------------------------------
setup.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/setup.py b/setup.py
index 4133ee0..c50776c 100644
--- a/setup.py
+++ b/setup.py
@@ -4,6 +4,10 @@
Setup script
"""
+# Required to build on EL6
+__requires__ = ['SQLAlchemy >= 0.7', 'jinja2 >= 2.4']
+import pkg_resources
+
from setuptools import setup
from fedocal import __version__
11 years
[fedocal] master: Remove bundled Flask-FAS (2a2e2f6)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 2a2e2f6edf0913a27e16ce813e60fa0bf893673f
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Mar 2 19:21:34 2013 +0100
Remove bundled Flask-FAS
This is now provided by python-fedora (pip) or
python-fedora-flask (rpm) correctly.
>---------------------------------------------------------------
fedocal/__init__.py | 2 +-
fedocal/flask_fas.py | 156 --------------------------------------------------
2 files changed, 1 insertions(+), 157 deletions(-)
diff --git a/fedocal/__init__.py b/fedocal/__init__.py
index 2fdca1d..af88856 100644
--- a/fedocal/__init__.py
+++ b/fedocal/__init__.py
@@ -34,7 +34,7 @@ import flask
import os
import vobject
from dateutil.relativedelta import relativedelta
-from flask_fas import FAS, cla_plus_one_required
+from flask.ext.fas import FAS, cla_plus_one_required
from sqlalchemy.exc import SQLAlchemyError
import forms as forms
diff --git a/fedocal/flask_fas.py b/fedocal/flask_fas.py
deleted file mode 100644
index 77b5ced..0000000
--- a/fedocal/flask_fas.py
+++ /dev/null
@@ -1,156 +0,0 @@
-# Flask-FAS - A Flask extension for authorizing users with FAS
-# Primary maintainer: Ian Weller <ianweller(a)fedoraproject.org>
-#
-# Copyright (c) 2012, Red Hat, Inc.
-#
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# * Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following disclaimer in the documentation
-# and/or other materials provided with the distribution.
-# * Neither the name of the Red Hat, Inc. nor the names of its contributors may
-# be used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import flask
-from flask import request
-
-from functools import wraps
-
-from fedora.client.fasproxy import FasProxyClient
-from fedora.client import AuthError
-
-try:
- from flask import _app_ctx_stack as stack
-except ImportError:
- from flask import _request_ctx_stack as stack
-
-__version__ = '0.1.0' # http://semver.org/
-
-
-class FAS(object):
-
- def __init__(self, app=None):
- self.app = app
- if self.app is not None:
- self._init_app(app)
-
- def _init_app(self, app):
- app.config.setdefault('FAS_BASE_URL',
- 'https://admin.fedoraproject.org/accounts/')
- app.config.setdefault('FAS_USER_AGENT', 'Flask-FAS/%s' % __version__)
- app.config.setdefault('FAS_CHECK_CERT', True)
- app.config.setdefault('FAS_COOKIE_NAME', 'tg-visit')
- app.config.setdefault('FAS_HTTPS_REQUIRED', True)
-
- app.before_request(self._check_session_cookie)
- app.after_request(self._send_session_cookie)
-
- @property
- def fasclient(self):
- ctx = stack.top
- if not hasattr(ctx, 'fasclient'):
- ctx.fasclient = FasProxyClient(
- base_url=self.app.config['FAS_BASE_URL'],
- useragent=self.app.config['FAS_USER_AGENT'],
- insecure=not self.app.config['FAS_CHECK_CERT'],
- )
- return ctx.fasclient
-
- def _check_session_cookie(self):
- if self.app.config['FAS_COOKIE_NAME'] in request.cookies \
- and self.app.config['FAS_COOKIE_NAME']:
- session_id = request.cookies[self.app.config['FAS_COOKIE_NAME']]
- try:
- session_id, user = self.fasclient.get_user_info({'session_id':
- session_id})
- if hasattr(user, 'approved_memberships'):
- user.groups = [x.name for x in user.approved_memberships]
- else:
- user.groups = []
- except AuthError:
- session_id = None
- user = None
- else:
- session_id = None
- user = None
- flask.g.fas_session_id = session_id
- flask.g.fas_user = user
-
- def _send_session_cookie(self, response):
- response.set_cookie(
- key=self.app.config['FAS_COOKIE_NAME'],
- value=flask.g.fas_session_id or '',
- httponly=True,
- )
- return response
-
- def login(self, username, password):
- """
- Tries to log in a user. Returns True if successful, False if not. Sets
- the session ID cookie.
- """
- try:
- session_id, junk = self.fasclient.login(username, password)
- user = junk.user
- if hasattr(flask.g.fas_user, 'approved_memberships'):
- user.groups = [x.name for x in user.approved_memberships]
- else:
- user.groups = []
- except AuthError:
- return False
- flask.g.fas_session_id = session_id
- flask.g.fas_user = user
- return True
-
- def logout(self):
- self.fasclient.logout(flask.g.fas_session_id)
- flask.g.fas_session_id = None
- flask.g.fas_user = None
-
-# This is a decorator we can use with any HTTP method (except login, obviously)
-# to require a login. In this application it is only used with claplusone and
-# secret. If the user is not logged in, it will redirect them to the login form.
-# http://flask.pocoo.org/docs/patterns/viewdecorators/#login-required-decor...
-def fas_login_required(f):
- @wraps(f)
- def decorated_function(*args, **kwargs):
- if flask.g.fas_user is None:
- return flask.redirect(flask.url_for('auth_login',
- next=flask.request.url))
- return f(*args, **kwargs)
- return decorated_function
-
-def cla_plus_one_required(f):
- @wraps(f)
- def decorated_function(*args, **kwargs):
- valid = True
- if flask.g.fas_user is None:
- valid = False
- else:
- non_cla_groups = [x.name for x in flask.g.fas_user.approved_memberships
- if x.group_type != 'cla']
- if len(non_cla_groups) == 0:
- valid = False
- if not valid:
- return flask.redirect(flask.url_for('auth_login',
- next=flask.request.url))
- else:
- return f(*args, **kwargs)
- return decorated_function
11 years