Skip to content

Commit

Permalink
Further fixes to PyPI install
Browse files Browse the repository at this point in the history
  • Loading branch information
A S Lewis committed Feb 24, 2020
1 parent 6baae8c commit cd45243
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 19 deletions.
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ Problems can be reported at `our GitHub page <https://github.com/axcore/tartube/
3 Downloads
===========

Latest version: **v1.5.013 (24 Feb 2019)**
Latest version: **v1.5.015 (24 Feb 2019)**

- `MS Windows (32-bit) installer <https://sourceforge.net/projects/tartube/files/v1.5.013/install-tartube-1.5.013-32bit.exe/download>`__ from Sourceforge
- `MS Windows (64-bit) installer <https://sourceforge.net/projects/tartube/files/v1.5.013/install-tartube-1.5.013-64bit.exe/download>`__ from Sourceforge
- `Source code <https://sourceforge.net/projects/tartube/files/v1.5.013/tartube_v1.5.013.tar.gz/download>`__ from Sourceforge
- `MS Windows (32-bit) installer <https://sourceforge.net/projects/tartube/files/v1.5.015/install-tartube-1.5.015-32bit.exe/download>`__ from Sourceforge
- `MS Windows (64-bit) installer <https://sourceforge.net/projects/tartube/files/v1.5.015/install-tartube-1.5.015-64bit.exe/download>`__ from Sourceforge
- `Source code <https://sourceforge.net/projects/tartube/files/v1.5.015/tartube_v1.5.015.tar.gz/download>`__ from Sourceforge
- `Source code <https://github.com/axcore/tartube>`__ and `support <https://github.com/axcore/tartube/issues>`__ from GitHub

4 Quick start guide
Expand Down Expand Up @@ -178,7 +178,7 @@ Here is the procedure for Debian-based distributions, like Ubuntu and Linux Mint
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. Type: ``sudo apt install python3-pip``
2. Type: ``sudo pip3 install tartube``
2. Type: ``pip3 install tartube``
3. The **Tartube** executable is stored in **~/.local/bin** by default. If that is already in your path, you can start **Tartube** by typing ``tartube``. Otherwise, type ``~/.local/bin/tartube``
4. **Tartube** asks you to choose a data directory, so do that
5. In the **Tartube** main window, click **Edit > System preferences... > youtube-dl**
Expand Down
6 changes: 3 additions & 3 deletions nsis/tartube_install_32bit.nsi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Tartube v1.5.013 installer script for MS Windows
# Tartube v1.5.015 installer script for MS Windows
#
# Copyright (C) 2019-2020 A S Lewis
#
Expand Down Expand Up @@ -139,7 +139,7 @@

;Name and file
Name "Tartube"
OutFile "install-tartube-1.5.013-32bit.exe"
OutFile "install-tartube-1.5.015-32bit.exe"

;Default installation folder
InstallDir "$LOCALAPPDATA\Tartube"
Expand Down Expand Up @@ -246,7 +246,7 @@ Section "Tartube" SecClient
# "Publisher" "A S Lewis"
# WriteRegStr HKLM \
# "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tartube" \
# "DisplayVersion" "1.5.013"
# "DisplayVersion" "1.5.015"

# Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
Expand Down
6 changes: 3 additions & 3 deletions nsis/tartube_install_64bit.nsi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Tartube v1.5.013 installer script for MS Windows
# Tartube v1.5.015 installer script for MS Windows
#
# Copyright (C) 2019-2020 A S Lewis
#
Expand Down Expand Up @@ -140,7 +140,7 @@

;Name and file
Name "Tartube"
OutFile "install-tartube-1.5.013-64bit.exe"
OutFile "install-tartube-1.5.015-64bit.exe"

;Default installation folder
InstallDir "$LOCALAPPDATA\Tartube"
Expand Down Expand Up @@ -247,7 +247,7 @@ Section "Tartube" SecClient
# "Publisher" "A S Lewis"
# WriteRegStr HKLM \
# "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tartube" \
# "DisplayVersion" "1.5.013"
# "DisplayVersion" "1.5.015"

# Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
# Setup
setuptools.setup(
name='tartube',
version='1.5.013',
version='1.5.015',
description='GUI front-end for youtube-dl',
# long_description=long_description,
long_description="""Tartube is a GUI front-end for youtube-dl, partly based
Expand Down
11 changes: 8 additions & 3 deletions tartube/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,26 +192,31 @@ def run(self):

self.app_obj.main_win_obj.output_tab_write_stdout(1, msg)

# Convert a path beginning with ~ (not on MS Windows)
ytdl_path = self.app_obj.ytdl_path
if os.name != 'nt':
ytdl_path = re.sub('^\~', os.path.expanduser('~'), ytdl_path)

# Prepare the system command
if self.info_type == 'formats':

cmd_list = [
'youtube-dl',
ytdl_path,
'--list-formats',
self.video_obj.source,
]

elif self.info_type == 'subs':

cmd_list = [
'youtube-dl',
ytdl_path,
'--list-subs',
self.video_obj.source,
]

else:

cmd_list = ['youtube-dl']
cmd_list = [ytdl_path]

if self.options_string is not None \
and self.options_string != '':
Expand Down
3 changes: 2 additions & 1 deletion tartube/mainapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ def __init__(self, *args, **kwargs):
# '/usr/bin/youtube-dl'
self.ytdl_path_default = None
# The path to the youtube-dl binary, after installation using PyPI.
# Not used on MS Windows
# Not used on MS Windows. The initial ~ character must be substituted
# for os.path.expanduser('~'), before use
self.ytdl_path_pypi = '~/.local/bin/youtube-dl'
# The actual path to use in the shell command during a download or
# update operation. Initially given the same value as
Expand Down
2 changes: 1 addition & 1 deletion tartube/tartube
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import mainapp
# 'Global' variables
__packagename__ = 'tartube'
__prettyname__ = 'Tartube'
__version__ = '1.5.013'
__version__ = '1.5.015'
__date__ = '24 Feb 2020'
__copyright__ = 'Copyright \xa9 2019-2020 A S Lewis'
__license__ = """
Expand Down
2 changes: 1 addition & 1 deletion tartube/tartube_debian
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import mainapp
# 'Global' variables
__packagename__ = 'tartube'
__prettyname__ = 'Tartube'
__version__ = '1.5.013'
__version__ = '1.5.015'
__date__ = '24 Feb 2020'
__copyright__ = 'Copyright \xa9 2019-2020 A S Lewis'
__license__ = """
Expand Down
4 changes: 4 additions & 0 deletions tartube/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,10 @@ def install_ytdl(self):
cmd_list \
= self.app_obj.ytdl_update_dict[self.app_obj.ytdl_update_current]

# Convert a path beginning with ~ (not on MS Windows)
if os.name != 'nt':
cmd_list[0] = re.sub('^\~', os.path.expanduser('~'), cmd_list[0])

# Create a new child process using that command
self.create_child_process(cmd_list)

Expand Down
7 changes: 6 additions & 1 deletion tartube/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,8 +779,13 @@ def generate_system_cmd(app_obj, media_data_obj, options_list,
elif divert_mode == 'invidious':
source = convert_youtube_to_invidious(source)

# Convert a path beginning with ~ (not on MS Windows)
ytdl_path = app_obj.ytdl_path
if os.name != 'nt':
ytdl_path = re.sub('^\~', os.path.expanduser('~'), ytdl_path)

# Set the list
cmd_list = [app_obj.ytdl_path] + options_list + [source]
cmd_list = [ytdl_path] + options_list + [source]

return cmd_list

Expand Down

0 comments on commit cd45243

Please sign in to comment.