Skip to content

Commit

Permalink
Merge pull request #46 from lbl-srg/issue45_multiPlatform
Browse files Browse the repository at this point in the history
Issue45 multi platform
  • Loading branch information
AntoineGautier authored Jun 22, 2020
2 parents 140e32a + 0b8e486 commit aa0d56b
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 29 deletions.
43 changes: 36 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
language: c

python:
- "2.7"
- "3.6"

notifications:
email: false

Expand All @@ -14,17 +10,50 @@ dist: xenial

matrix:
include:
- os: linux
- name: Python 2.7 on Linux
os: linux
env: ARCH_OPTION=""
compiler: gcc
python: 2.7
- name: Python 3.6 on Linux
os: linux
env: ARCH_OPTION=""
compiler: gcc
- os: osx
python: 3.6
- name: Python 3.7 on Linux
os: linux
env: ARCH_OPTION=""
compiler: gcc
- os: windows
python: 3.7
- name: Python 3.8 on Linux
os: linux
env: ARCH_OPTION=""
compiler: gcc
python: 3.8
- name: Python 2.7 on macOS
os: osx
env: ARCH_OPTION=""
compiler: gcc
env: PYENV_VERSION=2.7
- name: Python 3.6 on macOS
os: osx
env: ARCH_OPTION=""
compiler: gcc
env: PYENV_VERSION=3.6
- name: Python 2.7 on Windows
os: windows
env: ARCH_OPTION="-A x64"
before_install:
- choco install python2
- export PATH="/c/Python27:/c/Python27/Scripts:$PATH"
- python -m pip install --user --upgrade pip
- name: Python 3.6 on Windows
os: windows
env: ARCH_OPTION="-A x64"
before_install:
- choco install python --version=3.6.8
- export PATH="/c/Python36:/c/Python36/Scripts:$PATH"
- python -m pip install --user --upgrade pip

before_install:
- python -m pip install --user --upgrade pip
Expand Down
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
global-include COPYRIGHT.txt LICENSE.txt README.md VERSION
recursive-include pyfunnel/templates *
recursive-include pyfunnel/templates *
recursive-include pyfunnel/lib *
2 changes: 1 addition & 1 deletion pyfunnel/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.2.1
9 changes: 5 additions & 4 deletions pyfunnel/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@
# Configuration functions and variables #
#########################################

CONFIG_PATH = os.path.join(os.environ.get('HOME'), '.pyfunnel')
CONFIG_PATH = os.path.join(os.path.expanduser('~'), '.pyfunnel') # os.environ.get('HOME')=None on Windows.
CONFIG_DEFAULT = dict(
BROWSER=None,
)
try: # Get the real browser name in case webbrowser.get(browser).name returns 'xdg-open' on Ubuntu.

# Get the real browser name in case webbrowser.get(browser).name returns 'xdg-open' on Ubuntu.
LINUX_DEFAULT = None
if platform.system() == 'Linux':
LINUX_DEFAULT = str(subprocess.check_output('xdg-settings get default-web-browser', shell=True))
except BaseException:
LINUX_DEFAULT = None


def read_config(config_path=CONFIG_PATH, config_default=CONFIG_DEFAULT):
Expand Down
16 changes: 0 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import codecs
import io
import platform
import os
import re
from setuptools import setup
Expand All @@ -21,18 +20,6 @@
with io.open(readme_path, encoding='utf-8') as f: # io.open for Python 2 support with encoding
README = f.read()

# Library path.
os_name = platform.system()
lib_data = 'lib' # Relative path in MAIN_PACKAGE.
if os_name == 'Windows':
lib_data = '{}/win64/*.dll'.format(lib_data)
elif os_name == 'Linux':
lib_data = '{}/linux64/*.so'.format(lib_data)
elif os_name == 'Darwin':
lib_data = '{}/darwin64/*.dylib'.format(lib_data)
else:
raise RuntimeError('Could not detect standard (system, architecture).')

setup(
name=MAIN_PACKAGE,
version=VERSION,
Expand All @@ -47,9 +34,6 @@
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
install_requires=['six>=1.11'],
packages=[MAIN_PACKAGE],
package_data={
MAIN_PACKAGE: [lib_data],
},
include_package_data=True,
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand Down

0 comments on commit aa0d56b

Please sign in to comment.