Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

stdeb nearly produces a totally-working .deb now.

  • Loading branch information...
commit 9ad7072b5817688ec70457a940cb51260c1a30ad 1 parent 78e206f
@philipn philipn authored
Showing with 85 additions and 37 deletions.
  1. +5 −0 MANIFEST.in
  2. +1 −0  install_config
  3. +0 −1  install_config/daisydiff.war
  4. +0 −2  media/.gitignore
  5. +14 −0 requirements.txt
  6. +1 −0  sapling/etc/install_config/daisydiff.war
  7. 0  { → sapling/etc}/install_config/defaults/README
  8. 0  { → sapling/etc}/install_config/defaults/localwiki/README
  9. 0  { → sapling/etc}/install_config/defaults/localwiki/VERSION
  10. 0  ...i/conf/localsettings.py → sapling/etc/install_config/defaults/localwiki/conf/localsettings.py.template
  11. 0  ...all_config/defaults/localwiki/themes → sapling/etc/install_config/defaults/localwiki/media}/.gitignore
  12. 0  ...fig/defaults/localwiki/templates/.gitignore → sapling/etc/install_config/defaults/localwiki/media/null
  13. 0  { → sapling/etc}/install_config/defaults/localwiki/static/.gitignore
  14. 0  ...config/defaults/localwiki/media/.gitignore → sapling/etc/install_config/defaults/localwiki/static/null
  15. 0  sapling/etc/install_config/defaults/localwiki/templates/null
  16. 0  sapling/etc/install_config/defaults/localwiki/themes/.gitignore
  17. 0  { → sapling/etc}/install_config/postgis_template_scripts/create_template_postgis-1.3.sh
  18. 0  { → sapling/etc}/install_config/postgis_template_scripts/create_template_postgis-1.4.sh
  19. 0  { → sapling/etc}/install_config/postgis_template_scripts/create_template_postgis-1.5.sh
  20. 0  { → sapling/etc}/install_config/postgis_template_scripts/create_template_postgis-debian.sh
  21. 0  { → sapling/etc}/install_config/setup_jetty.sh
  22. 0  { → sapling/etc}/install_config/solr_schema.xml
  23. +2 −1  sapling/manage.py
  24. +1 −1  sapling/settings.py
  25. 0  { → sapling}/templates/olwidget/multi_layer_map.html
  26. 0  { → sapling}/templates/registration/login.html
  27. 0  { → sapling}/templates/registration/password_reset_complete.html
  28. 0  { → sapling}/templates/registration/password_reset_confirm.html
  29. 0  { → sapling}/templates/registration/password_reset_done.html
  30. 0  { → sapling}/templates/registration/password_reset_email.html
  31. 0  { → sapling}/templates/registration/password_reset_form.html
  32. 0  { → sapling}/templates/registration/registration_form.html
  33. 0  { → sapling}/templates/tos/license_in_edit.html
  34. 0  { → sapling}/templates/tos/license_on_signup.html
  35. 0  { → sapling}/themes/README
  36. 0  { → sapling}/themes/sapling/README
  37. 0  { → sapling}/themes/sapling/assets/css/reset.css
  38. 0  { → sapling}/themes/sapling/assets/css/site.css
  39. 0  { → sapling}/themes/sapling/assets/img/LICENSE.txt
  40. 0  { → sapling}/themes/sapling/assets/img/arrow-turn-left.png
  41. 0  { → sapling}/themes/sapling/assets/img/body-bg.png
  42. 0  { → sapling}/themes/sapling/assets/img/footer-bg.png
  43. 0  { → sapling}/themes/sapling/assets/img/gradient.png
  44. 0  { → sapling}/themes/sapling/assets/img/header-bg.png
  45. 0  { → sapling}/themes/sapling/assets/img/magnifying_glass.png
  46. 0  { → sapling}/themes/sapling/assets/img/map-icon-small.png
  47. 0  { → sapling}/themes/sapling/assets/img/map-icon.png
  48. 0  { → sapling}/themes/sapling/assets/pages/css/diff.css
  49. 0  { → sapling}/themes/sapling/assets/pages/css/pages.css
  50. 0  { → sapling}/themes/sapling/assets/pages/img/email_link.png
  51. 0  { → sapling}/themes/sapling/assets/pages/img/external_link.png
  52. 0  { → sapling}/themes/sapling/assets/pages/img/file_icons/LICENSE.txt
  53. 0  { → sapling}/themes/sapling/assets/pages/img/file_icons/document-block.png
  54. 0  { → sapling}/themes/sapling/assets/pages/img/file_icons/document-code.png
  55. 0  { → sapling}/themes/sapling/assets/pages/img/file_icons/document-excel.png
  56. 0  { → sapling}/themes/sapling/assets/pages/img/file_icons/document-film.png
  57. 0  { → sapling}/themes/sapling/assets/pages/img/file_icons/document-globe.png
  58. 0  { → sapling}/themes/sapling/assets/pages/img/file_icons/document-image.png
  59. 0  { → sapling}/themes/sapling/assets/pages/img/file_icons/document-music.png
  60. 0  { → sapling}/themes/sapling/assets/pages/img/file_icons/document-pdf.png
  61. 0  { → sapling}/themes/sapling/assets/pages/img/file_icons/document-powerpoint.png
  62. 0  { → sapling}/themes/sapling/assets/pages/img/file_icons/document-text-image.png
  63. 0  { → sapling}/themes/sapling/assets/pages/img/file_icons/document-text.png
  64. 0  { → sapling}/themes/sapling/assets/pages/img/file_icons/document-word.png
  65. 0  { → sapling}/themes/sapling/assets/pages/img/file_icons/document-zipper.png
  66. 0  { → sapling}/themes/sapling/assets/pages/js/diff.js
  67. 0  { → sapling}/themes/sapling/templates/site/base.html
  68. 0  { → sapling}/themes/sapling/templates/site/login_info.html
  69. 0  { → sapling}/themes/sapling/templates/site/nav.html
  70. 0  { → sapling}/themes/sapling/templates/site/search_form.html
  71. 0  { → sapling}/themes/sapling/templates/site/site_title.html
  72. 0  sapling/utils/management/__init__.py
  73. +23 −7 sapling/utils/management/commands/init_data_dir.py
  74. +1 −1  sapling/utils/management/commands/init_db.py
  75. +34 −22 setup.py
  76. +0 −2  static/.gitignore
  77. +3 −0  stdeb.cfg
View
5 MANIFEST.in
@@ -0,0 +1,5 @@
+include CONTRIBUTING
+include COPYING
+include INSTALL
+include README
+recursive-include docs *
View
1  install_config
View
1  install_config/daisydiff.war
View
2  media/.gitignore
@@ -1,2 +0,0 @@
-# Don't commit anything, this is the media folder
-*
View
14 requirements.txt
@@ -0,0 +1,14 @@
+setuptools
+django>=1.3
+html5lib>=0.90
+Sphinx>=1.0.7
+sorl-thumbnail>=11.01
+python-dateutil>=1.5
+pysolr
+django-haystack
+django-randomfilenamestorage
+django-guardian
+South
+django-staticfiles>=1.1.2
+https://bitbucket.org/ubernostrum/django-registration/get/tip.tar.gz#egg=django-registration
+-e git+git://github.com/philipn/olwidget.git@custom_base_layers_fixed#egg=django-olwidget
View
1  sapling/etc/install_config/daisydiff.war
View
0  install_config/defaults/README → sapling/etc/install_config/defaults/README
File renamed without changes
View
0  install_config/defaults/localwiki/README → sapling/etc/install_config/defaults/localwiki/README
File renamed without changes
View
0  install_config/defaults/localwiki/VERSION → ...ing/etc/install_config/defaults/localwiki/VERSION
File renamed without changes
View
0  ...l_config/defaults/localwiki/conf/localsettings.py → ...defaults/localwiki/conf/localsettings.py.template
File renamed without changes
View
0  install_config/defaults/localwiki/themes/.gitignore → ...nstall_config/defaults/localwiki/media/.gitignore
File renamed without changes
View
0  ...ll_config/defaults/localwiki/templates/.gitignore → .../etc/install_config/defaults/localwiki/media/null
File renamed without changes
View
0  install_config/defaults/localwiki/static/.gitignore → ...stall_config/defaults/localwiki/static/.gitignore
File renamed without changes
View
0  install_config/defaults/localwiki/media/.gitignore → ...etc/install_config/defaults/localwiki/static/null
File renamed without changes
View
0  sapling/etc/install_config/defaults/localwiki/templates/null
No changes.
View
0  sapling/etc/install_config/defaults/localwiki/themes/.gitignore
No changes.
View
0  ...s_template_scripts/create_template_postgis-1.3.sh → ...s_template_scripts/create_template_postgis-1.3.sh
File renamed without changes
View
0  ...s_template_scripts/create_template_postgis-1.4.sh → ...s_template_scripts/create_template_postgis-1.4.sh
File renamed without changes
View
0  ...s_template_scripts/create_template_postgis-1.5.sh → ...s_template_scripts/create_template_postgis-1.5.sh
File renamed without changes
View
0  ...emplate_scripts/create_template_postgis-debian.sh → ...emplate_scripts/create_template_postgis-debian.sh
File renamed without changes
View
0  install_config/setup_jetty.sh → sapling/etc/install_config/setup_jetty.sh
File renamed without changes
View
0  install_config/solr_schema.xml → sapling/etc/install_config/solr_schema.xml
File renamed without changes
View
3  sapling/manage.py
@@ -9,7 +9,8 @@
# We have to hard-code these here, as we run a few setup commands (in
# setup_all) that execute before the settings can be safely loaded.
DATA_ROOT = os.path.join(sys.prefix, 'share', 'localwiki')
-PROJECT_ROOT = os.path.join(os.path.dirname(__file__), '..')
+PROJECT_ROOT = os.path.split(os.path.abspath(__file__))[0]
+
def main(set_apps_path=True):
if set_apps_path:
View
2  sapling/settings.py
@@ -15,7 +15,7 @@
MANAGERS = ADMINS
DATA_ROOT = os.path.join(sys.prefix, 'share', 'localwiki')
-PROJECT_ROOT = os.path.join(os.path.dirname(__file__), '..')
+PROJECT_ROOT = os.path.join(os.path.dirname(__file__))
DATABASES = {
'default': {
View
0  templates/olwidget/multi_layer_map.html → sapling/templates/olwidget/multi_layer_map.html
File renamed without changes
View
0  templates/registration/login.html → sapling/templates/registration/login.html
File renamed without changes
View
0  templates/registration/password_reset_complete.html → ...mplates/registration/password_reset_complete.html
File renamed without changes
View
0  templates/registration/password_reset_confirm.html → ...emplates/registration/password_reset_confirm.html
File renamed without changes
View
0  templates/registration/password_reset_done.html → ...g/templates/registration/password_reset_done.html
File renamed without changes
View
0  templates/registration/password_reset_email.html → .../templates/registration/password_reset_email.html
File renamed without changes
View
0  templates/registration/password_reset_form.html → ...g/templates/registration/password_reset_form.html
File renamed without changes
View
0  templates/registration/registration_form.html → ...ing/templates/registration/registration_form.html
File renamed without changes
View
0  templates/tos/license_in_edit.html → sapling/templates/tos/license_in_edit.html
File renamed without changes
View
0  templates/tos/license_on_signup.html → sapling/templates/tos/license_on_signup.html
File renamed without changes
View
0  themes/README → sapling/themes/README
File renamed without changes
View
0  themes/sapling/README → sapling/themes/sapling/README
File renamed without changes
View
0  themes/sapling/assets/css/reset.css → sapling/themes/sapling/assets/css/reset.css
File renamed without changes
View
0  themes/sapling/assets/css/site.css → sapling/themes/sapling/assets/css/site.css
File renamed without changes
View
0  themes/sapling/assets/img/LICENSE.txt → sapling/themes/sapling/assets/img/LICENSE.txt
File renamed without changes
View
0  themes/sapling/assets/img/arrow-turn-left.png → ...ing/themes/sapling/assets/img/arrow-turn-left.png
File renamed without changes
View
0  themes/sapling/assets/img/body-bg.png → sapling/themes/sapling/assets/img/body-bg.png
File renamed without changes
View
0  themes/sapling/assets/img/footer-bg.png → sapling/themes/sapling/assets/img/footer-bg.png
File renamed without changes
View
0  themes/sapling/assets/img/gradient.png → sapling/themes/sapling/assets/img/gradient.png
File renamed without changes
View
0  themes/sapling/assets/img/header-bg.png → sapling/themes/sapling/assets/img/header-bg.png
File renamed without changes
View
0  themes/sapling/assets/img/magnifying_glass.png → ...ng/themes/sapling/assets/img/magnifying_glass.png
File renamed without changes
View
0  themes/sapling/assets/img/map-icon-small.png → sapling/themes/sapling/assets/img/map-icon-small.png
File renamed without changes
View
0  themes/sapling/assets/img/map-icon.png → sapling/themes/sapling/assets/img/map-icon.png
File renamed without changes
View
0  themes/sapling/assets/pages/css/diff.css → sapling/themes/sapling/assets/pages/css/diff.css
File renamed without changes
View
0  themes/sapling/assets/pages/css/pages.css → sapling/themes/sapling/assets/pages/css/pages.css
File renamed without changes
View
0  themes/sapling/assets/pages/img/email_link.png → ...ng/themes/sapling/assets/pages/img/email_link.png
File renamed without changes
View
0  themes/sapling/assets/pages/img/external_link.png → ...themes/sapling/assets/pages/img/external_link.png
File renamed without changes
View
0  ...s/sapling/assets/pages/img/file_icons/LICENSE.txt → ...s/sapling/assets/pages/img/file_icons/LICENSE.txt
File renamed without changes
View
0  ...ng/assets/pages/img/file_icons/document-block.png → ...ng/assets/pages/img/file_icons/document-block.png
File renamed without changes
View
0  ...ing/assets/pages/img/file_icons/document-code.png → ...ing/assets/pages/img/file_icons/document-code.png
File renamed without changes
View
0  ...ng/assets/pages/img/file_icons/document-excel.png → ...ng/assets/pages/img/file_icons/document-excel.png
File renamed without changes
View
0  ...ing/assets/pages/img/file_icons/document-film.png → ...ing/assets/pages/img/file_icons/document-film.png
File renamed without changes
View
0  ...ng/assets/pages/img/file_icons/document-globe.png → ...ng/assets/pages/img/file_icons/document-globe.png
File renamed without changes
View
0  ...ng/assets/pages/img/file_icons/document-image.png → ...ng/assets/pages/img/file_icons/document-image.png
File renamed without changes
View
0  ...ng/assets/pages/img/file_icons/document-music.png → ...ng/assets/pages/img/file_icons/document-music.png
File renamed without changes
View
0  ...ling/assets/pages/img/file_icons/document-pdf.png → ...ling/assets/pages/img/file_icons/document-pdf.png
File renamed without changes
View
0  ...sets/pages/img/file_icons/document-powerpoint.png → ...sets/pages/img/file_icons/document-powerpoint.png
File renamed without changes
View
0  ...sets/pages/img/file_icons/document-text-image.png → ...sets/pages/img/file_icons/document-text-image.png
File renamed without changes
View
0  ...ing/assets/pages/img/file_icons/document-text.png → ...ing/assets/pages/img/file_icons/document-text.png
File renamed without changes
View
0  ...ing/assets/pages/img/file_icons/document-word.png → ...ing/assets/pages/img/file_icons/document-word.png
File renamed without changes
View
0  ...g/assets/pages/img/file_icons/document-zipper.png → ...g/assets/pages/img/file_icons/document-zipper.png
File renamed without changes
View
0  themes/sapling/assets/pages/js/diff.js → sapling/themes/sapling/assets/pages/js/diff.js
File renamed without changes
View
0  themes/sapling/templates/site/base.html → sapling/themes/sapling/templates/site/base.html
File renamed without changes
View
0  themes/sapling/templates/site/login_info.html → ...ing/themes/sapling/templates/site/login_info.html
File renamed without changes
View
0  themes/sapling/templates/site/nav.html → sapling/themes/sapling/templates/site/nav.html
File renamed without changes
View
0  themes/sapling/templates/site/search_form.html → ...ng/themes/sapling/templates/site/search_form.html
File renamed without changes
View
0  themes/sapling/templates/site/site_title.html → ...ing/themes/sapling/templates/site/site_title.html
File renamed without changes
View
0  sapling/utils/management/__init__.py
No changes.
View
30 sapling/utils/management/commands/init_data_dir.py
@@ -1,6 +1,7 @@
import sys
import os
import shutil
+import errno
class Command(object):
@@ -13,20 +14,35 @@ def handle(self, *args, **kwargs):
share_dir = os.path.join(sys.prefix, 'share')
data_dir = os.path.join(share_dir, 'localwiki')
- # Check to make sure the data directory doesn't already exist.
- if os.path.exists(data_dir):
- sys.stderr.write("Data directory %s already exists!\n" % data_dir)
- return
-
# Create the data directory and copy defaults into it.
if not os.path.exists(share_dir):
os.makedirs(share_dir)
- defaults_dir = os.path.join(self.PROJECT_ROOT, 'install_config',
+
+ defaults_dir = os.path.join(self.PROJECT_ROOT, 'etc', 'install_config',
'defaults')
- shutil.copytree(os.path.join(defaults_dir, 'localwiki'), data_dir)
+
+ for item in os.listdir(os.path.join(defaults_dir, 'localwiki')):
+ if os.path.exists(os.path.join(data_dir, item)):
+ sys.stderr.write("Directory %s already exists! Skipping..\n" %
+ os.path.join(data_dir, item))
+ continue
+ src = os.path.join(defaults_dir, 'localwiki', item)
+ dst = os.path.join(data_dir, item)
+ try:
+ shutil.copytree(src, dst)
+ except OSError as exc:
+ if exc.errno == errno.ENOTDIR:
+ shutil.copy(src, dst)
+ else:
+ raise
+
+ # Rename localsettings.py.template to localsettings.py
+ os.rename(os.path.join(data_dir, 'conf', 'localsettings.py.template'),
+ os.path.join(data_dir, 'conf', 'localsettings.py'))
print ('Created data directory in %s\n' % data_dir)
+
def run(DATA_ROOT=None, PROJECT_ROOT=None):
c = Command()
c.DATA_ROOT = DATA_ROOT
View
2  sapling/utils/management/commands/init_db.py
@@ -36,7 +36,7 @@ def create_spatial_template(self):
elif which_pgis == '3':
script = 'create_template_postgis-1.3.sh'
- script_path = os.path.join(self.PROJECT_ROOT,
+ script_path = os.path.join(self.PROJECT_ROOT, 'etc',
'install_config', 'postgis_template_scripts', script)
# Make a temp file so postgres user can always read it.
fd, temp_path = tempfile.mkstemp()
View
56 setup.py
@@ -19,7 +19,6 @@
# you can't import this from another package, when you don't know if
# that package is installed yet.
def find_package_data(
-
where='.', package='',
exclude=standard_exclude,
exclude_directories=standard_exclude_directories,
@@ -51,8 +50,6 @@ def find_package_data(
Note patterns use wildcards, or can be exact paths (including
leading ``./``), and all searching is case-insensitive.
"""
-
-
out = {}
stack = [(convert_path(where), '', package, only_in_packages)]
while stack:
@@ -101,12 +98,40 @@ def find_package_data(
def gen_data_files(*dirs):
results = []
- for src_dir in dirs:
+ for dir_info in dirs:
+ if type(dir_info) == tuple:
+ src_dir, name = dir_info
+ else:
+ name = dir_info
+ src_dir = dir_info
+ top_root = None
for root, dirs, files in os.walk(src_dir):
- results.append((root, map(lambda f: root + "/" + f, files)))
+ if top_root is None:
+ top_root = root
+ root_name = root.replace(top_root, name, 1)
+ results.append((root_name, map(lambda f: root + "/" + f, files)))
return results
+install_requires = [
+ 'setuptools',
+ 'django>=1.3',
+ 'html5lib>=0.90',
+ 'Sphinx>=1.0.7',
+ 'sorl-thumbnail>=11.01',
+ 'python-dateutil>=1.5',
+ 'pysolr',
+ 'django-haystack',
+ 'django-randomfilenamestorage',
+ 'django-guardian',
+ 'South',
+ 'django-staticfiles>=1.1.2',
+ 'django-registration==0.8.0-alpha-1',
+ 'django-olwidget==0.46-custom1',
+]
+if int(os.getenv('DISABLE_INSTALL_REQUIRES', '0')):
+ install_requires = None
+
setup(
name='localwiki',
version=get_version(),
@@ -116,24 +141,11 @@ def gen_data_files(*dirs):
author_email='philip@localwiki.org',
packages=find_packages(),
package_dir={'sapling': 'sapling'},
- data_files=gen_data_files('install_config', 'templates', 'themes'),
+ data_files=gen_data_files(
+ ('docs', 'share/localwiki/docs')
+ ),
package_data=find_package_data(),
- install_requires=[
- 'setuptools',
- 'django>=1.3',
- 'html5lib>=0.90',
- 'Sphinx>=1.0.7',
- 'sorl-thumbnail>=11.01',
- 'python-dateutil==1.5',
- 'pysolr',
- 'django-haystack',
- 'django-randomfilenamestorage',
- 'django-guardian',
- 'South',
- 'django-staticfiles>=1.1.2',
- 'django-registration==0.8.0-alpha-1',
- 'django-olwidget==0.46-custom1',
- ],
+ install_requires=install_requires,
dependency_links=[
'https://bitbucket.org/ubernostrum/django-registration/get/tip.tar.gz#egg=django-registration-0.8.0-alpha-1',
'https://github.com/philipn/olwidget/tarball/custom_base_layers_fixed#egg=django-olwidget-0.46-custom1',
View
2  static/.gitignore
@@ -1,2 +0,0 @@
-# Don't commit anything, this is the static folder
-*
View
3  stdeb.cfg
@@ -0,0 +1,3 @@
+[DEFAULT]
+Depends: python-pip, python-virtualenv, python-setuptools, solr-jetty, python-lxml, python-imaging, gdal-bin, proj, postgresql-8.4-postgis, python-psycopg2
+Setup-Env-Vars: DISABLE_INSTALL_REQUIRES=1
Please sign in to comment.
Something went wrong with that request. Please try again.