Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init the tinyms package build process #2

Merged
merged 1 commit into from
Jan 26, 2021
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,10 @@ dmypy.json

# Pyre type checker
.pyre/

# workspace
.idea/
.vscode/

# auto-generated py file
*/version.py
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ before_install:
- sudo apt-get install -y libssl-dev
# command to install dependencies
install:
- pip install mindspore
- python setup.py install
- python setup.py sdist bdist_wheel
- pip install dist/tinyms-0.1.0-py3-none-any.whl
# command to run tests
script: python -c "import mindspore;print(mindspore.__version__)"
script:
- python -c "import mindspore; print(mindspore.__version__)"
- python -c "import tinyms; print(tinyms.__version__)"

services:
- docker
17 changes: 17 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# TinyMS 0.1.0 Release Notes

## TinyMS

### Major Features and Improvements

#### NewModels

### API Change

#### Backwards Incompatible Change

##### Python API

### Bug fixes

### Contributors
84 changes: 84 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#!/usr/bin/env python3
# encoding: utf-8
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""setup package."""
import os
import setuptools

package_name = 'tinyms'
version_tag = '0.1.0'
pwd = os.path.dirname(os.path.realpath(__file__))

def _read_file(filename):
with open(os.path.join(pwd, filename), encoding='UTF-8') as f:
return f.read()


readme = _read_file('README.md')
release = _read_file('RELEASE.md')


def _write_version(file):
file.write("__version__ = '{}'\n".format(version_tag))


required_package = [
'scipy >= 1.5.3',
'mindspore >= 1.1.0',
'wheel >= 0.32.0',
'setuptools >= 40.8.0',
]

if __name__ == "__main__":
with open(os.path.join(pwd, package_name, 'version.py'), 'w') as f:
_write_version(f)

setuptools.setup(
name=package_name,
version=version_tag,
author='The TinyMS Authors',
author_email='wanghui71leon@gmail.com',
url='https://github.com/tinyms-ai/tinyms',
download_url='https://github.com/tinyms-ai/tinyms/tags',
project_urls={
'Sources': 'https://github.com/tinyms-ai/tinyms',
'Issue Tracker': 'https://github.com/tinyms-ai/tinyms/issues',
},
description='TinyMS is an Easy-to-Use deep learning development toolkit.',
long_description="\n\n".join([readme, release]),
long_description_content_type="text/markdown",
packages=setuptools.find_packages(),
python_requires='>=3.7',
install_requires=required_package,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: C++',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
],
license='Apache 2.0',
keywords='machine learning toolkit',
)
19 changes: 19 additions & 0 deletions tinyms/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
""".. TinyMS package."""
from .version import __version__

__all__ = []
__all__.extend(__version__)