Permalink
Browse files

revising setup distutils

  • Loading branch information...
1 parent 092aa12 commit b57e4a3e99efee36a39c3fe3d913a9ddd57c515d @yarden committed Dec 25, 2011
Showing with 34 additions and 13 deletions.
  1. +1 −1 MANIFEST.in
  2. +1 −1 Makefile
  3. +6 −1 misopy/run_events_analysis.py
  4. +26 −10 setup.py
View
@@ -1,3 +1,3 @@
include pysplicing/include/*
include pysplicing/src/f2c/*
-include pysplicing/src/lapack/*
+include pysplicing/src/lapack/*
View
@@ -45,7 +45,7 @@ PSRC6 = $(wildcard pysplicing/src/*.c) $(wildcard pysplicing/include/*.h) \
Pythonpackage: pysplicing-0.1.tar.gz
pysplicing-0.1.tar.gz: $(PSRC3) $(PSRC4) $(PSRC5) $(PSRC6) pysplicing/setup.py MANIFEST.in
- rm -f MANIFEST
+ rm -f pysplicing/MANIFEST
cd pysplicing && python setup.py sdist -d ..
pysplicing/src/%.c: src/%.c
@@ -16,6 +16,10 @@
import misopy.cluster_utils as cluster_utils
miso_path = os.path.dirname(os.path.abspath(__file__))
+miso_settings_path = sys.prefix
+print "==>",sys.prefix
+print __name__
+print __file__
def compute_all_genes_psi(gff_dir, bam_filename, read_len, output_dir,
use_cluster=False, SGEarray=False, chunk_jobs=200,
@@ -325,7 +329,8 @@ def main():
"sufficient number of junction reads. The default filter "
"varies by event type.")
parser.add_option("--settings-filename", dest="settings_filename",
- default=os.path.join(miso_path, "settings", "miso_settings.txt"),
+ default=os.path.join(miso_settings_path,
+ "settings", "miso_settings.txt"),
help="Filename specifying MISO settings.")
parser.add_option("--pool-counts", dest="pool_counts", default=None,
help="Given a series of comma separated filenames (no spaces), "
View
@@ -60,6 +60,16 @@
if sys.version_info > (3, 0):
options["use_2to3"] = True
+# This forces distutils to place the data files
+# in the directory where the Py packages are installed
+# (usually 'site-packages'). This is unfortunately
+# required since there's no good way to retrieve
+# data_files= from setup() in a platform independent
+# way.
+from distutils.command.install import INSTALL_SCHEMES
+for scheme in INSTALL_SCHEMES.values():
+ scheme['data'] = scheme['purelib']
+
setup(name = 'misopy',
version = '0.1',
description = 'Mixture of Isoforms model (MISO) for isoform quantitation using RNA-Seq',
@@ -76,16 +86,22 @@
# Tell distutils to look for pysplicing in the right directory
package_dir = {'pysplicing': 'pysplicing/pysplicing'},
packages = ['misopy', 'pysplicing'],
- scripts = [os.path.join('misopy', 'module_availability.py'),
- os.path.join('misopy', 'test_miso.py'),
- os.path.join('misopy', 'test_cluster.py'),
- os.path.join('misopy', 'index_gff.py'),
- os.path.join('misopy', 'sam_to_bam.py'),
- os.path.join('misopy', 'run_events_analysis.py'),
- os.path.join('misopy', 'run_miso.py'),
- os.path.join('misopy', 'exon_utils.py'),
- os.path.join('misopy', 'pe_utils.py'),
- os.path.join('misopy', 'filter_events.py')],
+# package_data = {'': ['misopy/settings/*.txt']},
+ # distutils always uses forward slashes
+ scripts = ['misopy/module_availability.py',
+ 'misopy/test_miso.py',
+ 'misopy/test_cluster.py',
+ 'misopy/index_gff.py',
+ 'misopy/sam_to_bam.py',
+ 'misopy/run_events_analysis.py',
+ 'misopy/run_miso.py',
+ 'misopy/exon_utils.py',
+ 'misopy/pe_utils.py',
+ 'misopy/filter_events.py',
+ 'misopy/settings/miso_settings.txt'],
+ data_files = [('miso_settings', [os.path.join('misopy', 'settings', 'miso_settings.txt'),
+ os.path.join('misopy', 'sashimi_plot',
+ 'settings', 'sashimi_plot_settings.txt')])],
# Required modules
install_requires = [
# "matplotlib >= 1.1.0",

0 comments on commit b57e4a3

Please sign in to comment.