Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

Commit

Permalink
Update travis
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberZHG committed Jun 6, 2020
1 parent fb4d9bd commit 89f405b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: python
python:
- 2.7
- 3.6
- 3.8
install:
- pip install --upgrade pip
- pip install -r requirements.txt
Expand Down
33 changes: 23 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,43 @@
import os
import re
import codecs
from setuptools import setup, find_packages

current_path = os.path.abspath(os.path.dirname(__file__))

with codecs.open('README.md', 'r', 'utf8') as reader:
long_description = reader.read()

def read_file(*parts):
with codecs.open(os.path.join(current_path, *parts), 'r', 'utf8') as reader:
return reader.read()

with codecs.open('requirements.txt', 'r', 'utf8') as reader:
install_requires = list(map(lambda x: x.strip(), reader.readlines()))

def get_requirements(*parts):
with codecs.open(os.path.join(current_path, *parts), 'r', 'utf8') as reader:
return list(map(lambda x: x.strip(), reader.readlines()))


def find_version(*file_paths):
version_file = read_file(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError('Unable to find version string.')


setup(
name='torch-layer-normalization',
version='0.10.2',
version=find_version('torch_layer_normalization', '__init__.py'),
packages=find_packages(),
url='https://github.com/CyberZHG/torch-layer-normalization',
license='MIT',
author='CyberZHG',
author_email='CyberZHG@gmail.com',
author_email='CyberZHG@users.noreply.github.com',
description='Layer normalization implemented in PyTorch',
long_description=long_description,
long_description=read_file('README.md'),
long_description_content_type='text/markdown',
install_requires=install_requires,
install_requires=get_requirements('requirements.txt'),
classifiers=(
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
),
Expand Down
2 changes: 2 additions & 0 deletions torch_layer_normalization/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .layer_normalization import *

__version__ = '0.11.0'

0 comments on commit 89f405b

Please sign in to comment.