Skip to content

Commit

Permalink
getting the setuptools and MANIFEST right
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlovelltroy committed Feb 19, 2014
1 parent 58992e4 commit 27782ea
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ global-exclude *.pyc
include *.md
include *.txt

recursive-include telemetry *
recursive-include telemetry/reporting/templates *
recursive-include telemetry/reporting/static *
recursive-include telemetry/reporting *.html
recursive-include telemetry/reporting *.js
recursive-include telemetry/reporting *.css
28 changes: 28 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
from distutils.core import setup
import os


packages, data_files = [], []
root_dir = os.path.dirname(__file__)
if root_dir:
os.chdir(root_dir)

for dirpath, dirnames, filenames in os.walk('telemetry'):
# Ignore dirnames that start with '.'
for i, dirname in enumerate(dirnames):
if dirname.startswith('.'): del dirnames[i]
if '__init__.py' in filenames:
pkg = dirpath.replace(os.path.sep, '.')
if os.path.altsep:
pkg = pkg.replace(os.path.altsep, '.')
packages.append(pkg)
elif filenames:
prefix = dirpath
for f in filenames:
data_files.append(os.path.join(prefix, f))
print data_files

setup(
name='django-telemetry',
Expand All @@ -14,6 +36,12 @@
'telemetry.reporting',
'telemetry.requests',
],
include_package_data=True,
package_data = { 'telemetry.reporting': [
"static/javascripts/*.js",
"static/*.css",
"templates/*.html",
]},
url='https://github.com/alexlovelltroy/django-telemetry',
license='LICENSE.txt',
long_description=open('README.md').read(),
Expand Down

0 comments on commit 27782ea

Please # to comment.