diff --git a/MANIFEST.in b/MANIFEST.in index 992024c..d185423 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ include droneCFD/*.py -recursive-include data * -recursive-include data/0 * -recursive-include data/system * -recursive-include data/constant * +recursive-include droneCFD/data * +recursive-include droneCFD/data/0 * +recursive-include droneCFD/data/system * +recursive-include droneCFD/data/constant * diff --git a/droneCFD/Utilities.py b/droneCFD/Utilities.py index 4909b50..d504537 100644 --- a/droneCFD/Utilities.py +++ b/droneCFD/Utilities.py @@ -29,12 +29,12 @@ def __init__(self, folderPath, geometryPath=None, templatePath=None, parserArgs= exit() if templatePath is None: - self.templatePath = os.path.dirname(__file__)+'/../data/template' + self.templatePath = os.path.dirname(__file__)+'/data/template' print 'Template File Path is: {0}'.format(self.templatePath) if geometryPath is None: ## Default to the base geometry - geometryPath = os.path.dirname(__file__)+'/../data/geometries/benchmarkAircraft.stl' + geometryPath = os.path.dirname(__file__)+'/data/geometries/benchmarkAircraft.stl' ## Since the path exists, lets make sure that folder doesn't exist #TODO: Don't just delete a folder without asking for permission diff --git a/droneCFD/data/__init__.py b/droneCFD/data/__init__.py new file mode 100644 index 0000000..7c35da7 --- /dev/null +++ b/droneCFD/data/__init__.py @@ -0,0 +1 @@ +__author__ = 'cpaulson' diff --git a/data/geometries/benchmarkAircraft.stl b/droneCFD/data/geometries/benchmarkAircraft.stl similarity index 100% rename from data/geometries/benchmarkAircraft.stl rename to droneCFD/data/geometries/benchmarkAircraft.stl diff --git a/data/template/0/R b/droneCFD/data/template/0/R similarity index 100% rename from data/template/0/R rename to droneCFD/data/template/0/R diff --git a/data/template/0/U b/droneCFD/data/template/0/U similarity index 100% rename from data/template/0/U rename to droneCFD/data/template/0/U diff --git a/data/template/0/epsilon b/droneCFD/data/template/0/epsilon similarity index 100% rename from data/template/0/epsilon rename to droneCFD/data/template/0/epsilon diff --git a/data/template/0/k b/droneCFD/data/template/0/k similarity index 100% rename from data/template/0/k rename to droneCFD/data/template/0/k diff --git a/data/template/0/nuTilda b/droneCFD/data/template/0/nuTilda similarity index 100% rename from data/template/0/nuTilda rename to droneCFD/data/template/0/nuTilda diff --git a/data/template/0/omega b/droneCFD/data/template/0/omega similarity index 100% rename from data/template/0/omega rename to droneCFD/data/template/0/omega diff --git a/data/template/0/p b/droneCFD/data/template/0/p similarity index 100% rename from data/template/0/p rename to droneCFD/data/template/0/p diff --git a/data/template/Allclean b/droneCFD/data/template/Allclean similarity index 100% rename from data/template/Allclean rename to droneCFD/data/template/Allclean diff --git a/data/template/Allrun b/droneCFD/data/template/Allrun similarity index 100% rename from data/template/Allrun rename to droneCFD/data/template/Allrun diff --git a/data/template/constant/RASProperties b/droneCFD/data/template/constant/RASProperties similarity index 100% rename from data/template/constant/RASProperties rename to droneCFD/data/template/constant/RASProperties diff --git a/data/template/constant/polyMesh/blockMeshDict b/droneCFD/data/template/constant/polyMesh/blockMeshDict similarity index 100% rename from data/template/constant/polyMesh/blockMeshDict rename to droneCFD/data/template/constant/polyMesh/blockMeshDict diff --git a/data/template/constant/transportProperties b/droneCFD/data/template/constant/transportProperties similarity index 100% rename from data/template/constant/transportProperties rename to droneCFD/data/template/constant/transportProperties diff --git a/data/template/constant/triSurface/README b/droneCFD/data/template/constant/triSurface/README similarity index 100% rename from data/template/constant/triSurface/README rename to droneCFD/data/template/constant/triSurface/README diff --git a/data/template/openme.foam b/droneCFD/data/template/openme.foam similarity index 100% rename from data/template/openme.foam rename to droneCFD/data/template/openme.foam diff --git a/data/template/system/controlDict b/droneCFD/data/template/system/controlDict similarity index 100% rename from data/template/system/controlDict rename to droneCFD/data/template/system/controlDict diff --git a/data/template/system/decomposeParDict b/droneCFD/data/template/system/decomposeParDict similarity index 100% rename from data/template/system/decomposeParDict rename to droneCFD/data/template/system/decomposeParDict diff --git a/data/template/system/fvSchemes b/droneCFD/data/template/system/fvSchemes similarity index 100% rename from data/template/system/fvSchemes rename to droneCFD/data/template/system/fvSchemes diff --git a/data/template/system/fvSolution b/droneCFD/data/template/system/fvSolution similarity index 100% rename from data/template/system/fvSolution rename to droneCFD/data/template/system/fvSolution diff --git a/data/template/system/snappyHexMeshDict b/droneCFD/data/template/system/snappyHexMeshDict similarity index 100% rename from data/template/system/snappyHexMeshDict rename to droneCFD/data/template/system/snappyHexMeshDict diff --git a/data/template/system/surfaceFeatureExtractDict b/droneCFD/data/template/system/surfaceFeatureExtractDict similarity index 100% rename from data/template/system/surfaceFeatureExtractDict rename to droneCFD/data/template/system/surfaceFeatureExtractDict diff --git a/setup.py b/setup.py index 05f0076..31e334a 100644 --- a/setup.py +++ b/setup.py @@ -4,11 +4,18 @@ from os import path, walk here = path.abspath(path.dirname(__file__)) -datadir = 'data' +datadir = 'droneCFD/data' package_data = [ (d, [path.join(d, f) for f in files]) for d,folders,files in walk(datadir)] +print package_data +data_files=[] +for i in package_data: + for j in i[1]: + data_files.append(j) +data_files = [path.relpath(file, datadir) for file in data_files] +# print files setup( name='droneCFD', -version='0.1.1', +version='0.1.1a', description='A virtual wind tunnel based on OpenFOAM and PyFOAM', long_description='Please see dronecfd.com for more information', url='http://www.dronecfd.com', @@ -28,10 +35,9 @@ ], keywords='cfd wind tunnel uav uas suas', install_requires=['XlsxWriter', 'numpy'], -packages=['droneCFD'], +packages=find_packages(), zip_safe = False, -package_dir={'droneCFD': 'droneCFD'}, -data_files=package_data, +package_data={"droneCFD.data":data_files,}, scripts=['droneCFD/scripts/dcCheck', 'droneCFD/scripts/dcRun', 'droneCFD/scripts/dcPostProcess'] # To provide executable scripts, use entry points in preference to the # "scripts" keyword. Entry points provide cross-platform support and allow