Giter Club home page Giter Club logo

condansis's Introduction

CondaNSIS

Test and Release Conda Recipe

CondaNSIS packages Python applications into self-extracting installers for Windows by leveraging both conda-pack and NSIS.

This project is inspired by PyNSIST.

Why?

Bundlers such as PyInstaller are great for small apps, but often have problems packaging complex projects with many dependencies. Alternativelly, deployment with Conda can be difficult as as it requires an Anaconda or a Miniconda installation.

CondaNSIS solves this problem by packaging your Python app together with a local and isolated Python environment, such that the target computer does not need neither Python nor a Conda already installed.

Installation

CondaNSIS is avaliable through conda-forge

conda install -c conda-forge condansis

Usage

Please see the documentation page. Due to limitations of the NSIS dependency, CondaNSIS does not run from Powershell.

Developers

Guilherme Bicalho Saturnino

condansis's People

Contributors

guilhermebs avatar

Stargazers

Joel Van Eenwyk avatar John Wason avatar boopathy prabhaharan avatar  avatar Nikos Vaggalis avatar Kristian Thy avatar Kasper Engel Vardinghus avatar Søren Fuglede Jørgensen avatar Curtis Mayberry avatar Zhao Xiaohong avatar Wolf Vollprecht avatar

Watchers

James Cloos avatar  avatar  avatar

condansis's Issues

example does not work

Hey,

I tried the example from the docs, but unfortunately it does not work:

windows server 2012
Python 3.7

snake.py

import time
SNAKE = r"""
                          ____
 ________________________/ O  \___/
<_____________________________/   \
"""

if __name__ == "__main__":
    print(SNAKE)
    time.sleep(10)

installer.py


from pathlib import Path
import condansis

if __name__ == "__main__":
    this_dir = Path(__file__).parent

    # instantiate Installer
    installer = condansis.Installer(
        package_name="snake-simulator",
        package_root=this_dir,
        package_version="1.0",
        include=["resources"],
        icon=Path("resources", "snake.ico"),
    )

    # Create a shortcut in the snake.exe entrypoint
    # In the target computer, entrypoints can be found at
    # $INSTDIR\$ENV\Scripts
    installer.add_shortcut(
        shortcut_name=Path("$INSTDIR", "snake.lnk"),
        target_file=Path("$INSTDIR", "$ENV", "Scripts", "snake.exe"),
        icon_file=Path("$INSTDIR", "resources", "snake.ico"),
    )

    # Create the installer
    installer.create()

File "...\installer example\installer.py", line 34, in
installer.create()

File "...\lib\site-packages\condansis\installer.py", line 354, in create
self.create_temp_env(env_prefix)

File "...\lib\site-packages\condansis\installer.py", line 221, in create_temp_env
check=True,

File "...\lib\subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:

File "...\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)

File "...\lib\subprocess.py", line 1148, in _execute_child
args = list2cmdline(args)

File "...\lib\subprocess.py", line 555, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg

TypeError: argument of type 'WindowsPath' is not iterable

Thanks for your help!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.