Permalink
Browse files

Packaging for PyPI

  • Loading branch information...
1 parent beac438 commit cecba9e5958a6dbeeee3602becdeae9d7bebee5e @facconi facconi committed Sep 25, 2012
View
@@ -12,6 +12,7 @@ var
sdist
develop-eggs
.installed.cfg
+MANIFEST
# Installer logs
pip-log.txt
View
@@ -0,0 +1 @@
+v1.0, 25/09/2012 -- Initial release
View
@@ -0,0 +1,24 @@
+* Copyright (c) 2012, Immediatic S.r.l.
+* 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 Immediatic S.r.l. 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 Immediatic S.r.l. ``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 Immediatic S.r.l. 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.
View
@@ -0,0 +1,5 @@
+include CHANGES.txt
+include LICENSE.txt
+include README.txt
+include MANIFEST.in
+recursive-include cmsplugin_flickr_slideshow/templates *
View
@@ -1,7 +0,0 @@
-cmsplugin_flickr_slideshow
-==========================
-
-Plugin for Django CMS that makes easy to embed Flickr slideshows.
-
-The plugin is available on [Django Packages](http://www.djangopackages.com/packages/p/cmsplugin_flickr_slideshow/).
-
View
@@ -0,0 +1,36 @@
+cmsplugin_flickr_slideshow
+==========================
+
+Plugin for Django CMS that makes easy to embed Flickr slideshows.
+
+Download: https://github.com/Immediatic/cmsplugin_flickr_slideshow
+
+Requirements:
+- django-cms-2.3 or greater
+- django: 1.4 or greater
+
+Last tested with:
+- django-cms-2.3.1
+- django: 1.4.1
+
+Setup
+-----
+
+- make sure requirements are installed and properly working
+- add cmsplugin_flickr_slideshow to python path
+- add 'cmsplugin_flickr_slideshow' to INSTALLED_APPS
+- run 'python manage.py migrate cmsplugin_flickr_slideshow' if using South or 'python manage.py syncdb' if not using South
+
+Settings
+--------
+
+- CMS_FLICKR_SLIDESHOW_DEFAULT_ALLOW_FULLSCREEN (Default True)
+- CMS_FLICKR_SLIDESHOW_DEFAULT_WIDTH (Default 400)
+- CMS_FLICKR_SLIDESHOW_DEFAULT_HEIGHT (Default 300)
+
+Credits
+-------
+
+This plugin derives from [cmsplugin-youtube](https://bitbucket.org/xenofox/cmsplugin-youtube) and has been customized for Vimeo movies.
+
+The plugin is available on [Django Packages](http://www.djangopackages.com/packages/p/cmsplugin_flickr_slideshow/).
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1 @@
+__author__ = 'francesco'
View
@@ -0,0 +1,86 @@
+#!/usr/bin/env python
+PACKAGE_NAME = 'cmsplugin_flickr_slideshow'
+PACKAGE_DIR = PACKAGE_NAME
+
+import os, sys
+
+from distutils.core import setup
+from distutils.command.install import INSTALL_SCHEMES
+
+def fullsplit(path, result=None):
+ """
+ Split a pathname into compontents (the opposite of os.path.join) in a
+ platform-neutral way.
+ """
+ if result is None:
+ result = []
+ head, tail = os.path.split(path)
+ if head == '':
+ return [tail] + result
+ if head == path:
+ return result
+ return fullsplit(head, [tail] + result)
+
+# Tell disutils to put the data_files in platofmr-specific installation
+# locations.
+for scheme in INSTALL_SCHEMES.values():
+ scheme['data'] = scheme['purelib']
+
+# Compile the list of packages available, because distuils doesn't have
+# and easy way to do this.
+packages, data_files = [], []
+root_dir = os.path.dirname(__file__)
+if root_dir != '':
+ os.chdir(root_dir)
+
+for dirpath, dirnames, filenames in os.walk(PACKAGE_DIR):
+ # Ignore dirnames that start with '.'
+ for i, dirname in enumerate(dirnames):
+ if dirname.startswith('.'): del dirnames[i]
+ if '__init__.py' in filenames:
+ packages.append('.'.join(fullsplit(dirpath)))
+ elif filenames:
+ data_files.append(
+ [dirpath, [os.path.join(dirpath, f) for f in filenames]]
+ )
+# Small hack for working with bdist_wininst
+# See http://mail.python.org/pipermail/distutils-sig/2004-August/004134.html
+if len(sys.argv) > 1 and sys.argv[1] == 'bdist_wininst':
+ for file_info in data_files:
+ file_info[0] = '\\PURELIB\\%s' % file_info[0]
+
+# Dynamically calculate the version based on package.VERSION
+version = __import__(PACKAGE_NAME).get_version()
+
+setup(
+ name=PACKAGE_NAME,
+ version=version.replace(' ', '-'),
+ packages=packages,
+ data_files=data_files,
+ url='https://github.com/Immediatic/cmsplugin_flickr_slideshow',
+ license='LICENSE.txt',
+ author='Francesco Facconi',
+ author_email='francesco@immediatic.it',
+ description='Plugin for Django CMS that makes easy to embed Flickr slideshows.',
+ install_requires=[
+ "Django >= 1.4",
+ "django-cms >= 2.3",
+ ],
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Plugins',
+ 'Environment :: Web Environment',
+ 'Framework :: Django',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: BSD License',
+ 'Natural Language :: English',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python :: 2',
+ 'Topic :: Multimedia :: Graphics :: Presentation',
+ 'Topic :: Software Development :: Libraries :: Python Modules',
+ 'Topic :: Utilities',
+ ]
+)
+
+
+

0 comments on commit cecba9e

Please sign in to comment.