瀏覽代碼

Updated to support 2.7

master
Teknikode 2 年之前
父節點
當前提交
31d2d6c874
共有 4 個文件被更改,包括 11 次插入11 次删除
  1. 2
    0
      setup.cfg
  2. 3
    4
      setup.py
  3. 2
    6
      teknik/uploads.py
  4. 4
    1
      teknik/util.py

+ 2
- 0
setup.cfg 查看文件

@@ -0,0 +1,2 @@
[bdist_wheel]
universal=1

+ 3
- 4
setup.py 查看文件

@@ -16,7 +16,7 @@ setup(
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='1.0.5',
version='1.0.7',

description='A library for using the Teknik Services',
long_description=long_description,
@@ -48,11 +48,12 @@ setup(

# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3 :: Only',
],

# What does your project relate to?
@@ -62,8 +63,6 @@ setup(
# simple. Or you can use find_packages().
packages=find_packages(exclude=['contrib', 'docs', 'tests']),

python_requires='>=3',
# Alternatively, if you want to distribute just a my_module.py, uncomment
# this:
# py_modules=["my_module"],

+ 2
- 6
teknik/uploads.py 查看文件

@@ -1,20 +1,16 @@
# Copyright (c) 2017 by Uncled1023 <admin@teknik.io>
#
# License BSD 3-Clause
import_success = True

# Base Libraries
import base64
import json

# Local Libraries
from . import util

# Dependencies
try:
import requests
except ImportError as e:
print('Missing package(s) for %s: %s' % ('Teknik', e))
import_success = False
import requests

# Main Functions
def UploadFile(url, filePath, username, authToken):

+ 4
- 1
teknik/util.py 查看文件

@@ -1,4 +1,7 @@
from urllib.parse import urljoin
try:
from urllib.parse import urljoin
except ImportError as e:
from urlparse import urljoin

defaultUrl = 'https://api.teknik.io/v1/'
defaultUsername = ''

Loading…
取消
儲存