Skip to content

Commit

Permalink
finish pypy support
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Mar 20, 2015
1 parent 534ff5e commit 5b30a51
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stdeb/command/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def initialize_options (self):
self.with_pypy = 'False'
self.no_python2_scripts = 'False'
self.no_python3_scripts = 'False'
self.no_pypy_scripts = 'False'
self.allow_virtualenv_install_location = False
self.sign_results = False

Expand Down Expand Up @@ -69,6 +70,7 @@ def str_to_bool(mystr):
self.with_pypy = str_to_bool(self.with_pypy)
self.no_python2_scripts = str_to_bool(self.no_python2_scripts)
self.no_python3_scripts = str_to_bool(self.no_python3_scripts)
self.no_pypy_scripts = str_to_bool(self.no_pypy_scripts)
if self.maintainer is not None:
# Get the locale specifying the encoding in sys.argv
import locale, codecs
Expand Down Expand Up @@ -220,6 +222,7 @@ def get_debinfo(self):
with_pypy = self.with_pypy,
no_python2_scripts = self.no_python2_scripts,
no_python3_scripts = self.no_python3_scripts,
no_pypy_scripts = self.no_pypy_scripts,
allow_virtualenv_install_location=self.allow_virtualenv_install_location,
)
return debinfo
10 changes: 10 additions & 0 deletions stdeb/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def check_call(*popenargs, **kwargs):
'If True, do not install scripts for python 2. (Default=False).'),
('no-python3-scripts=',None,
'If True, do not install scripts for python 3. (Default=False).'),
('no-pypy-scripts=',None,
'If True, do not install scripts for pypy. (Default=False).'),
('allow-virtualenv-install-location',None,
'Allow installing into /some/random/virtualenv-path'),
('sign-results',None,
Expand Down Expand Up @@ -713,6 +715,7 @@ def __init__(self,
with_pypy = None,
no_python2_scripts = None,
no_python3_scripts = None,
no_pypy_scripts = None,
allow_virtualenv_install_location=False,
):
if cfg_files is NotGiven: raise ValueError("cfg_files must be supplied")
Expand Down Expand Up @@ -1114,6 +1117,12 @@ def __init__(self,
self.exports += '\n'
no_script_lines.append(
'rm -rf debian/%s/trash'%(self.package3,))
if no_pypy_scripts:
# install to a location where debian tools do not find them
self.exports += 'export PYBUILD_INSTALL_ARGS_pypy=--install-scripts=/trash'
self.exports += '\n'
no_script_lines.append(
'rm -rf debian/%s/trash'%(self.package_pypy,))

self.scripts_cleanup = '\n'.join([' '+s for s in no_script_lines])

Expand Down Expand Up @@ -1171,6 +1180,7 @@ def __init__(self,
self.with_pypy = with_pypy
self.no_python2_scripts = no_python2_scripts
self.no_python3_scripts = no_python3_scripts
self.no_pypy_scripts = no_pypy_scripts

def _make_cfg_defaults(self,
module_name=NotGiven,
Expand Down

0 comments on commit 5b30a51

Please sign in to comment.