Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 33 additions & 7 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,18 @@ def _create_batch_scripts_initial(self):
pathps = convps(self.prepath) + ";$env:path;" + convps(self.postpath)

self.create_batch_script('env.bat', r"""@echo off
set WINPYDIR=%~dp0.."""+"\\" + self.python_name + r"""
set WINPYDIRBASE=%~dp0..
rem get a normalize path
CALL :NORMALIZEPATH "%WINPYDIRBASE%"
set WINPYDIRBASE=%RETVAL%
set RETVAL=

set WINPYDIR=%WINPYDIRBASE%"""+"\\" + self.python_name + r"""

set WINPYVER=""" + self.winpyver + r"""
set HOME=%~dp0..\settings
set HOME=%WINPYDIRBASE%\settings
set WINPYDIRBASE=

set JUPYTER_DATA_DIR=%HOME%
set WINPYARCH=WIN32
if "%WINPYDIR:~-5%"=="amd64" set WINPYARCH=WIN-AMD64
Expand Down Expand Up @@ -598,6 +607,17 @@ def _create_batch_scripts_initial(self):
echo #JUPYTER_DATA_DIR = %%HOME%%>>"%winpython_ini%"
echo #WINPYWORKDIR = %%HOMEDRIVE%%%%HOMEPATH%%\Documents\WinPython%%WINPYVER%%\Notebooks>>"%winpython_ini%"
)

rem *****
rem http://stackoverflow.com/questions/1645843/resolve-absolute-path-from-relative-path-and-or-file-name
rem *****
:: ========== FUNCTIONS ==========
EXIT /B

:NORMALIZEPATH
SET RETVAL=%~dpfn1
EXIT /B

""")

self.create_batch_script('WinPython_PS_Prompt.ps1', r"""
Expand All @@ -607,15 +627,21 @@ def _create_batch_scripts_initial(self):
$0 = $myInvocation.MyCommand.Definition
$dp0 = [System.IO.Path]::GetDirectoryName($0)

$env:WINPYDIRBASE = "$dp0\.."
# get a normalize path
# http://stackoverflow.com/questions/1645843/resolve-absolute-path-from-relative-path-and-or-file-name
$env:WINPYDIRBASE = [System.IO.Path]::GetFullPath( $env:WINPYDIRBASE )

# avoid double_init (will only resize screen)
if (-not $env:WINPYDIR -eq "$dp0\..\python-3.4.4.amd64") {
if (-not $env:WINPYDIR -eq [System.IO.Path]::GetFullPath( $env:WINPYDIRBASE+"""+'"\\' + self.python_name + '"' + r""") ) {


$env:WINPYDIR = $env:WINPYDIRBASE+"""+ '"' + '\\' + self.python_name + '"' + r"""

# $env:WINPYDIR = '$pwd\..\python-3.4.4.amd64'
$env:WINPYDIR = "$dp0\..\python-3.4.4.amd64"

$env:WINPYDIR = "$dp0\.."""+'\\' + self.python_name + '"' + r"""
$env:WINPYVER = '""" + self.winpyver + r"""'
$env:HOME = "$env:WINPYDIR\..\settings"
$env:HOME = "$env:WINPYDIRBASE\settings"
$env:WINPYDIRBASE = ""
$env:JUPYTER_DATA_DIR = "$env:HOME"
$env:WINPYARCH = 'WIN32'
if ($env:WINPYARCH.subString($env:WINPYARCH.length-5, 5) -eq 'amd64') {
Expand Down
21 changes: 18 additions & 3 deletions winpython/data/packages.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ description=Taylor Arithmetic Computation and Algorithmic Differentiation
[altair]
description=High-level declarative visualization library for Python

[amqp]
description=Low-level AMQP client for Python (fork of amqplib).

[anyjson]
description=Wraps the best available JSON implementation available in a common interface

[appdirs]
description=A small Python module for determining appropriate " + "platform-specific dirs, e.g. a "user data dir".

Expand Down Expand Up @@ -52,6 +58,9 @@ description=columnar and compressed data containers.
[beautifulsoup4]
description=Screen-scraping library

[billiard]
description=Python multiprocessing fork with improvements and bugfixes

[bitarray]
description=efficient arrays of booleans -- C extension

Expand Down Expand Up @@ -97,6 +106,9 @@ description=Universal encoding detector. This library is faster than chardet.
[cssselect]
description=cssselect parses CSS3 Selectors and translates them to XPath 1.0

[celery]
description=Distributed Task Queue.

[certifi]
description=Python package for providing Mozilla's CA Bundle.

Expand Down Expand Up @@ -412,6 +424,9 @@ description=A software library for rapid development of hardware-accelerated mul
[knit]
description=Python tool for defining and deploying YARN Applications

[kombu]
description=Messaging library for Python.

[lasagne]
description=neural network tools for Theano

Expand Down Expand Up @@ -767,9 +782,6 @@ description=Pygame gives multimedia to python.
[pygit2]
description=Python bindings for libgit2.

[pyomo]
description=Pyomo: Python Optimization Modeling Objects

[pygments]
description=Generic syntax highlighter for general use in all kinds of software
url=http://pygments.org
Expand Down Expand Up @@ -808,6 +820,9 @@ description=Python driver for MongoDB <http://www.mongodb.org>
[pyodbc]
description=DB API Module for ODBC

[pyomo]
description=Pyomo: Python Optimization Modeling Objects

[pyopencl]
description=Python wrapper for OpenCL

Expand Down