Skip to content
This repository has been archived by the owner on Jun 29, 2019. It is now read-only.

Difficult to deploy a package #16

Open
zooba opened this issue Oct 2, 2015 · 0 comments
Open

Difficult to deploy a package #16

zooba opened this issue Oct 2, 2015 · 0 comments

Comments

@zooba
Copy link
Collaborator

zooba commented Oct 2, 2015

I've deployed a package for use by my service in the following way:

# If we've published, we need to add the package to sys.path
# so the following import succeeds.
import os, sys
deployed_package = os.path.abspath(r'Script Bundle\vsop.zip')
if os.path.isfile(deployed_package):
    sys.path.append(deployed_package)

from vsop.planets import *

@publish('..., '...', files=[('vsop.zip', None)])
def get_all_planets(year, month, day, hour):
    ...

It would be nice if we could take the package name (or imported module) in a decorator, create and deploy the ZIP file automatically, and update sys.path on the server automatically.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant