mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 12:04:10 +00:00
Fix building plugins when python isn't in the PATH
This commit is contained in:
parent
9ed0a80679
commit
8025889598
9
setup.py
9
setup.py
@ -23,6 +23,7 @@
|
|||||||
import ez_setup
|
import ez_setup
|
||||||
ez_setup.use_setuptools()
|
ez_setup.use_setuptools()
|
||||||
import glob
|
import glob
|
||||||
|
import sys
|
||||||
|
|
||||||
from setuptools import setup, find_packages, Extension
|
from setuptools import setup, find_packages, Extension
|
||||||
from distutils import cmd, sysconfig
|
from distutils import cmd, sysconfig
|
||||||
@ -258,12 +259,10 @@ class build_plugins(cmd.Command):
|
|||||||
def run(self):
|
def run(self):
|
||||||
# Build the plugin eggs
|
# Build the plugin eggs
|
||||||
PLUGIN_PATH = "deluge/plugins/*"
|
PLUGIN_PATH = "deluge/plugins/*"
|
||||||
if windows_check():
|
|
||||||
PLUGIN_PATH = "deluge\\plugins\\"
|
|
||||||
|
|
||||||
for path in glob.glob(PLUGIN_PATH):
|
for path in glob.glob(PLUGIN_PATH):
|
||||||
if os.path.exists(os.path.join(path, "setup.py")):
|
if os.path.exists(os.path.join(path, "setup.py")):
|
||||||
os.system("cd " + path + "&& python setup.py bdist_egg -d ..")
|
os.system("cd " + path + "&& " + sys.executable + " setup.py bdist_egg -d ..")
|
||||||
|
|
||||||
class build(_build):
|
class build(_build):
|
||||||
sub_commands = [('build_trans', None), ('build_plugins', None)] + _build.sub_commands
|
sub_commands = [('build_trans', None), ('build_plugins', None)] + _build.sub_commands
|
||||||
@ -288,12 +287,10 @@ class clean_plugins(cmd.Command):
|
|||||||
print("Cleaning the plugin folders..")
|
print("Cleaning the plugin folders..")
|
||||||
|
|
||||||
PLUGIN_PATH = "deluge/plugins/*"
|
PLUGIN_PATH = "deluge/plugins/*"
|
||||||
if windows_check():
|
|
||||||
PLUGIN_PATH = "deluge\\plugins\\"
|
|
||||||
|
|
||||||
for path in glob.glob(PLUGIN_PATH):
|
for path in glob.glob(PLUGIN_PATH):
|
||||||
if os.path.exists(os.path.join(path, "setup.py")):
|
if os.path.exists(os.path.join(path, "setup.py")):
|
||||||
c = "cd " + path + "&& python setup.py clean"
|
c = "cd " + path + "&& " + sys.executable + " setup.py clean"
|
||||||
if self.all:
|
if self.all:
|
||||||
c += " -a"
|
c += " -a"
|
||||||
os.system(c)
|
os.system(c)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user