adding initial spec file and alembic config changes for outside dev env

This commit is contained in:
Tim Flink 2013-03-07 08:14:35 -07:00
commit 0487f27243
2 changed files with 104 additions and 0 deletions

View file

@ -13,6 +13,11 @@ script_location = alembic
sqlalchemy.url = driver://user:pass@localhost/dbname
[alembic-packaged]
# path to migration scripts on a packaged install
script_location = /usr/share/blockerbugs/alembic
sqlalchemy.url = driver://user:pass@localhost/dbname
# Logging configuration
[loggers]

99
blockerbugs.spec Normal file
View file

@ -0,0 +1,99 @@
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
Name: blockerbugs
Version: 0.2.6
Release: 1%{?dist}
Summary: Fedora QA Blocker Tracking Application
License: GPL2+
URL: https://fedorahosted.org/fedora-qa
Source0: http://git.fedorahosted.org/cgit/blockerbugs.git/snapshot/blockerbugs-%{version}.tar.gz
BuildArch: noarch
Requires: python-flask
Requires: python-flask-sqlalchemy
Requires: python-flask-wtf
Requires: python-fedora
Requires: python-fedora-flask
Requires: python-alembic
Requires: python-psycopg2
Requires: python-bugzilla >= 0.8
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: pytest
BuildRequires: python-sphinx
BuildRequires: python-dingus
BuildRequires: python-bunch
BuildRequires: python-flask
BuildRequires: python-flask-sqlalchemy
BuildRequires: python-fedora-flask
BuildRequires: python-mock
# this needs to be removed once the code is fixed
BuildRequires: python-lxml
# python-sqlalchemy is too old on el6 but required on fedora
%if 0%{?rhel}
Requires: python-sqlalchemy0.7
BuildRequires: python-sqlalchemy0.7
%else
Requires: python-sqlalchemy
BuildRequires: python-sqlalchemy
%endif
%description
The blocker tracking app is a web front end to the currently proposed blocker
and freeze exception bugs for Fedora releases under developmnet.
%prep
%setup -q
%check
%{__python} setup.py test
%build
%{__python} setup.py build
# build docs
sphinx-build -b html -d docs/_build/doctrees docs/source docs/_build/html
# generate config
%{__python} blockerbugs/cli.py generate_config -d '' -z "%{_datadir}/blockerbugs/.bugzillacookies"
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
# alembic stuff
mkdir -p %{buildroot}%{_datadir}/blockerbugs
cp -r alembic %{buildroot}%{_datadir}/blockerbugs/.
cp alembic.ini %{buildroot}%{_datadir}/blockerbugs/.
# apache config and wsgi stuff
mkdir -p %{buildroot}%{_datadir}/blockerbugs/conf
cp conf/blockerbugs.conf %{buildroot}%{_datadir}/blockerbugs/conf/.
cp conf/blockerbugs.wsgi %{buildroot}%{_datadir}/blockerbugs/.
# configuration file
mkdir -p %{buildroot}%{_sysconfdir}/blockerbugs
install conf/settings.py %{buildroot}%{_sysconfdir}/blockerbugs/settings.py
%files
%doc docs/_build/html/*
%{python_sitelib}/*
%attr(755,root,root) %{_bindir}/blockerbugs
%dir %{_sysconfdir}/blockerbugs
%{_sysconfdir}/blockerbugs/*
%dir %{_datadir}/blockerbugs
%{_datadir}/blockerbugs/*
%changelog
* Wed Mar 6 2013 Tim Flink <tflink@fedoraproject.org> - 0.2.6-1
- Initial package for the blocker tracking app