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
19 changes: 17 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ jobs:
stage: test
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
env:
- PYTHON_VERSION=3.7.5
- PATH=/c/Python37:/c/Python37/Scripts:$PATH
- name: "3.8 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
env:
- PYTHON_VERSION=3.8.0
- PATH=/c/Python38:/c/Python38/Scripts:$PATH
- name: "3.5 on Linux"
language: python
python: 3.5
Expand All @@ -46,6 +55,9 @@ jobs:
- name: "3.7 on Linux"
language: python
python: 3.7
- name: "3.8 on Linux"
language: python
python: 3.8
- name: "3.7 on Mac"
os: osx
osx_image: xcode11.3
Expand All @@ -63,6 +75,9 @@ jobs:
language: shell
install:
script: ./scripts/build_windows.cmd
env:
- PYTHON_VERSION=3.7.5
- PATH=/c/Python37:/c/Python37/Scripts:$PATH
- name: "Linux pkgs"
language: python
python: 3.7
Expand All @@ -71,11 +86,11 @@ jobs:
script: ./scripts/build_posix.sh
- name: "PyPI pkgs"
language: python
python: 3.7
python: 3.8
script: ./scripts/build_package.sh
- name: Snapcraft snap
language: python
python: 3.7
python: 3.8
addons:
snaps:
- name: snapcraft
Expand Down
3 changes: 2 additions & 1 deletion dvc/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
import os
import platform
import shutil
import sys

from dvc.compat import fspath
from dvc.exceptions import DvcException

logger = logging.getLogger(__name__)

if platform.system() == "Windows":
if platform.system() == "Windows" and sys.version_info < (3, 8):
try:
import speedcopy

Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ if [[ "$TRAVIS_BUILD_STAGE_NAME" == "Test" ]]; then
fi

if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
$scriptdir/retry.sh choco install python --version 3.7.5
echo 'PATH="/c/Python37:/c/Python37/Scripts:$PATH"' >>env.sh
$scriptdir/retry.sh choco install python --version $PYTHON_VERSION
echo "PATH='$PATH'" >>env.sh
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
ln -s -f /usr/local/bin/python3 /usr/local/bin/python
ln -s -f /usr/local/bin/pip3 /usr/local/bin/pip
Expand Down
8 changes: 8 additions & 0 deletions scripts/ci/install_hadoop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ echo "export HADOOP_COMMON_HOME=/usr/local/hadoop" >>env.sh
echo "export HADOOP_HDFS_HOME=/usr/local/hadoop" >>env.sh
echo "export YARN_HOME=/usr/local/hadoop" >>env.sh
echo "export HADOOP_COMMON_LIB_NATIVE_DIR=/usr/local/hadoop/lib/native" >>env.sh

# PyArrow==0.16.0 regression https://issues.apache.org/jira/browse/ARROW-7841
# retrieves native library from $HADOOP_HOME directory instead of
# `$HADOOP_HOME/lib/native`.
# Fix: force search for `libhdfs.so` inside `$HADOOP_HOME/lib/native`.
# Note: not needed for PyArrow==0.17.0.
echo "export ARROW_LIBHDFS_DIR=/usr/local/hadoop/lib/native" >> env.sh

echo "export JAVA_HOME=/usr/" >>env.sh
echo "export PATH=\$PATH:/usr/local/hadoop/sbin:/usr/local/hadoop/bin:$JAVA_PATH/bin" >>env.sh

Expand Down
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def run(self):
"pywin32>=225; sys_platform == 'win32'",
"networkx>=2.1,<2.4",
"pydot>=1.2.4",
"speedcopy>=2.0.1; sys_platform == 'win32'",
"speedcopy>=2.0.1; python_version < '3.8' and sys_platform == 'win32'",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of dependencies don't have classifiers for Python3.8, but seems to have worked.

"flatten_json>=0.1.6",
"texttable>=0.5.2",
"pygtrie==2.3.2",
Expand All @@ -89,7 +89,12 @@ def run(self):
azure = ["azure-storage-blob==2.1.0"]
oss = ["oss2==2.6.1"]
ssh = ["paramiko>=2.5.0"]
hdfs = ["pyarrow==0.15.1"]
hdfs = [
# pyarrow-0.16.0 import fails on 3.5 and 3.7 (works on 3.6 though)
# due to: https://issues.apache.org/jira/browse/ARROW-7852
"pyarrow==0.15.1; python_version < '3.8'",
"pyarrow==0.16.0; python_version == '3.8'",
]
# gssapi should not be included in all_remotes, because it doesn't have wheels
# for linux and mac, so it will fail to compile if user doesn't have all the
# requirements, including kerberos itself. Once all the wheels are available,
Expand Down Expand Up @@ -157,6 +162,7 @@ def run(self):
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
packages=find_packages(exclude=["tests"]),
include_package_data=True,
Expand Down
8 changes: 4 additions & 4 deletions tests/func/test_checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,10 @@ def test(self):
self.assertEqual(ret, 0)

self.assertTrue(System.is_symlink(self.FOO))
old_foo_link = os.readlink(self.FOO)
old_foo_link = os.path.realpath(self.FOO)
Copy link
Collaborator Author

@skshetry skshetry Mar 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using realpath due to change in how readlink works in Python3.8 and Windows: https://docs.python.org/3.8/library/os.html#os.readlink)


self.assertTrue(System.is_symlink(self.DATA))
old_data_link = os.readlink(self.DATA)
old_data_link = os.path.realpath(self.DATA)

old_cache_dir = self.dvc.cache.local.cache_dir
new_cache_dir = old_cache_dir + "_new"
Expand All @@ -452,10 +452,10 @@ def test(self):
self.assertEqual(ret, 0)

self.assertTrue(System.is_symlink(self.FOO))
new_foo_link = os.readlink(self.FOO)
new_foo_link = os.path.realpath(self.FOO)

self.assertTrue(System.is_symlink(self.DATA))
new_data_link = os.readlink(self.DATA)
new_data_link = os.path.realpath(self.DATA)

self.assertEqual(
relpath(old_foo_link, old_cache_dir),
Expand Down