Skip to content

Commit

Permalink
more mucking around with setup.py and MANIFEST
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Malmgren committed Dec 3, 2012
1 parent e57944c commit e876e23
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
3 changes: 0 additions & 3 deletions MANIFEST.in
Expand Up @@ -5,9 +5,6 @@ include LICENSE.rst
recursive-include flux/static * recursive-include flux/static *
recursive-include flux/fixtures * recursive-include flux/fixtures *
recursive-include flux/templates * recursive-include flux/templates *
#recursive-include flux/management *
#recursive-include flux/management/commands *
#recursive-include flux *
recursive-exclude * *.py[co] recursive-exclude * *.py[co]
recursive-exclude * *~ recursive-exclude * *~
recursive-exclude * *.orig recursive-exclude * *.orig
2 changes: 1 addition & 1 deletion flux/__init__.py
@@ -1 +1 @@
__version__ = "0.1.6" __version__ = "0.1.0"
21 changes: 15 additions & 6 deletions setup.py
Expand Up @@ -31,18 +31,23 @@ def fullsplit(path, result=None):
if package: if package:
dependencies.append(package) dependencies.append(package)


# get a list of all the packages to include in scr_dir # get a list of all the packages to include in scr_dir. inspiration
# from the django setup.py
src_dir = 'flux' src_dir = 'flux'
packages, data_files = [], [] packages = []
#data_files = []
package_data = {src_dir:[]}
for dirpath, dirnames, filenames in os.walk(src_dir): for dirpath, dirnames, filenames in os.walk(src_dir):
for i, dirname in enumerate(dirnames): for i, dirname in enumerate(dirnames):
if dirname.startswith('.') or dirname == '__pycache__': if dirname.startswith('.') or dirname == '__pycache__':
del dirnames[i] del dirnames[i]
if '__init__.py' in filenames: if '__init__.py' in filenames:
packages.append('.'.join(fullsplit(dirpath))) packages.append('.'.join(fullsplit(dirpath)))
elif filenames: elif filenames:
data_files.append([dirpath, # data_files.append([dirpath,
[os.path.join(dirpath, f) for f in filenames]]) # [os.path.join(dirpath, f) for f in filenames]])
package_data[src_dir].extend([os.path.join(dirpath, f)
for f in filenames])


setup( setup(
name="django-flux", name="django-flux",
Expand All @@ -53,8 +58,12 @@ def fullsplit(path, result=None):
author_email="dean.malmgren@datascopeanalytics.com", author_email="dean.malmgren@datascopeanalytics.com",
license="MIT, see LICENSE.rst", license="MIT, see LICENSE.rst",
url="http://github.com/deanmalmgren/django-flux", url="http://github.com/deanmalmgren/django-flux",
download_url="http://github.com/deanmalmgren/django-flux/archives/master",
install_requires=dependencies, install_requires=dependencies,
packages=packages, packages=packages,
# install_package_data=True, package_data=package_data,
data_files=data_files,
# # data files are installed on the system path. for details see
# # http://docs.python.org/2/distutils/setupscript.html#installing-additional-files
# data_files=data_files,
) )

0 comments on commit e876e23

Please sign in to comment.