-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from ngageoint/distro
Add setup.py for creating wheels
- Loading branch information
Showing
12 changed files
with
83 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.whl | ||
*.pyc | ||
*~ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
from setuptools import setup, Distribution | ||
import sys | ||
import glob | ||
import os | ||
import platform | ||
import sys | ||
|
||
installDir = '' | ||
for child in os.listdir(os.getcwd()): | ||
if os.path.isdir(child): | ||
subdirs = os.listdir(child) | ||
if 'tests' in subdirs: | ||
installDir = child | ||
|
||
packages = '' | ||
libdir = '@LIBDIR@' | ||
if platform.system() == 'Windows': | ||
packages = os.path.join(libdir, 'site-packages') | ||
else: | ||
versionedPython = 'python{0}.{1}'.format( | ||
sys.version_info[0], sys.version_info[1]) | ||
packages = os.path.join( | ||
libdir, versionedPython, 'site-packages') | ||
|
||
|
||
class BinaryDistribution(Distribution): | ||
def is_pure(self): | ||
return False | ||
|
||
codaPyds = glob.glob(os.path.join(packages, 'coda', '_*')) | ||
codaPyds = [os.path.basename(pyd) for pyd in codaPyds] | ||
|
||
sixPyds = glob.glob(os.path.join(packages, 'pysix', '_*')) | ||
sixPyds = [os.path.basename(pyd) for pyd in sixPyds] | ||
|
||
|
||
setup(name = 'pysix', | ||
version = '@SIX_VERSION@', | ||
description = ('The Sensor Independent XML library (six), is a cross-' | ||
'platform C++ API for reading and writing NGA\'s complex and ' | ||
'derived sensor independent radar formats. Pysix is a Python ' | ||
'wrapper to allow easy reading and writing of the complex format.'), | ||
install_requires = [ 'numpy' ], | ||
package_dir = {'': packages}, | ||
packages = ['pysix', 'coda'], | ||
package_data = { | ||
'pysix': sixPyds, | ||
'coda': codaPyds | ||
}, | ||
distclass = BinaryDistribution) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import os | ||
|
||
options = distclean = lambda p: None | ||
|
||
def configure(conf): | ||
conf.env['SETUP_PY_DIR'] = conf.getBuildDir() | ||
|
||
def build(bld): | ||
bld(features='subst', | ||
name='six_setup', | ||
source='setup.py.in', | ||
target='setup.py', | ||
SIX_VERSION=bld.env['SIX_VERSION'], | ||
LIBDIR=bld.env['install_libdir']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters