Skip to content

Commit

Permalink
infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
s-m-e committed Dec 9, 2019
1 parent 5308f6e commit dae1de3
Show file tree
Hide file tree
Showing 7 changed files with 280 additions and 0 deletions.
7 changes: 7 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# AUTHORS

Core developer & maintainer: Sebastian M. Ernst <[email protected]>

Contributors, in alphabetical order:

- TBD
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changes

## 0.1.0 (2019-XX-XX)

- [TBD]
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# How to contribute to *wenv-kernel*

Thank you for considering contributing to *wenv-kernel*!
**Contributions are highly welcomed!**

## Branching model

Development happens in the `develop` branch. Please issue pull requests against `develop`. The `master` branch is supposed to be kept at the latest, stable *release*.

## Language level & interpreters

This project targets Python 3 exclusively. Python 3.4 support is optional and can be dropped if required. Python 3.5 and later are mandatory as Python 3.5 is still widely used and supported. The primary target so far is CPython, although PyPy support is highly welcome.

## General workflow

If you are planning on working on a "larger" issue or feature, please add yourself to the corresponding issue on GitHub or create a new one there - before you start working. This helps to reduce duplicate effort and allows to coordinate developers.

New features are supposed to be tested. Tests are expected as part of pull requests.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[![build_master](https://img.shields.io/travis/pleiszenburg/wenv-kernel/master.svg?style=flat-square "Build Status: master / release")](https://travis-ci.org/pleiszenburg/wenv-kernel)
[![docs_master](https://readthedocs.org/projects/wenv-kernel/badge/?version=latest&style=flat-square "Documentation Status: master / release")](https://wenv-kernel.readthedocs.io/en/latest/)
[![build_develop](https://img.shields.io/travis/pleiszenburg/wenv-kernel/develop.svg?style=flat-square "Build Status: development branch")](https://travis-ci.org/pleiszenburg/wenv-kernel)
[![docs_develop](https://readthedocs.org/projects/wenv-kernel/badge/?version=develop&style=flat-square "Documentation Status: development branch")](https://wenv-kernel.readthedocs.io/en/develop/)
[![license](https://img.shields.io/pypi/l/wenvkernel.svg?style=flat-square "Internet Systems Consortium License")](https://github.com/pleiszenburg/wenv-kernel/blob/master/LICENSE)
[![status](https://img.shields.io/pypi/status/wenvkernel.svg?style=flat-square "Project Development Status")](https://github.com/pleiszenburg/wenv-kernel/issues)
[![pypi_version](https://img.shields.io/pypi/v/wenvkernel.svg?style=flat-square "Project Development Status")](https://pypi.python.org/pypi/wenvkernel)
[![pypi_versions](https://img.shields.io/pypi/pyversions/wenvkernel.svg?style=flat-square "Available on PyPi - the Python Package Index")](https://pypi.python.org/pypi/wenvkernel)

![wenv](http://www.pleiszenburg.de/wenv-kernel_logo.png)

## Synopsis

**wenv-kernel** is a **Python package** (currently in development **status 4/beta**). It allows to **run Python on top of Wine as a Jupyter kernel** on Linux, MacOS or BSD. It is based upon **[wenv](https://github.com/pleiszenburg/wenv)**.

## Prerequisites

A working installation of `wenv`, see [installation instructions](https://wenv.readthedocs.io/en/latest/installation.html) in its documentation. If not present, `wenv-kernel` will try to install and configure `wenv` automatically. It is assumed that *Wine* is present.

## Installation

| branch | status | installation | documentation |
| --- | --- | --- | --- |
| master (release) | [![build_master](https://img.shields.io/travis/pleiszenburg/wenv-kernel/master.svg?style=flat-square "Build Status: master / release")](https://github.com/pleiszenburg/wenv-kernel/blob/master/LICENSE) | `pip install wenvkernel` | [![docs_master](https://readthedocs.org/projects/wenv/-kernelbadge/?version=latest&style=flat-square "Documentation Status: master / release")](https://wenv-kernel.readthedocs.io/en/latest/) |
| develop | [![build_develop](https://img.shields.io/travis/pleiszenburg/wenv-kernel/develop.svg?style=flat-square "Build Status: development branch")](https://wenv-kernel.readthedocs.io/en/develop/) | `pip install git+https://github.com/pleiszenburg/wenv-kernel.git@develop` | [![docs_develop](https://readthedocs.org/projects/wenv-kernel/badge/?version=develop&style=flat-square "Documentation Status: development branch")](https://github.com/pleiszenburg/wenv-kernel/blob/master/LICENSE) |

After installing the package with `pip`, you must initialize the "Wine Python environment" by running ``wenv init``.

## Examples

[TBD]

## Need help?

Feel free to post questions in the [GitHub issue tracker](https://github.com/pleiszenburg/wenv-kernel/labels/question) of this project.

## Bugs & issues

- Report bugs in *wenv-kernel* here: [wenv-kernel GitHub issue tracker](https://github.com/pleiszenburg/wenv-kernel/issues)
- Report bugs in *wenv* here: [wenv GitHub issue tracker](https://github.com/pleiszenburg/wenv/issues)
- Report bugs in *Wine* here: [WineHQ Bug Tracking System](https://bugs.winehq.org/)

## Miscellaneous

- Full project documentation
- at [Read the Docs](http://wenv-kernel.readthedocs.io/en/latest/)
- at [`wenv-kernel` repository](https://github.com/pleiszenburg/wenv-kernel/blob/master/docs/index.rst)
- [Authors](https://github.com/pleiszenburg/wenv-kernel/blob/master/AUTHORS.md)
- [Change log (current)](https://github.com/pleiszenburg/wenv-kernel/blob/develop/CHANGES.md) (changes in development branch since last release)
- [Change log (past)](https://github.com/pleiszenburg/wenv-kernel/blob/master/CHANGES.md) (release history)
- [Contributing](https://github.com/pleiszenburg/wenv-kernel/blob/master/CONTRIBUTING.md) (**Contributions are highly welcomed!**)
- [FAQ](http://wenv-kernel.readthedocs.io/en/stable/faq.html)
- [License](https://github.com/pleiszenburg/wenv-kernel/blob/master/LICENSE) (**LGPL v2.1**)
- [Upstream issues](https://github.com/pleiszenburg/wenv-kernel/issues?q=is%3Aissue+is%3Aopen+label%3Aupstream) (relevant bugs in dependencies)
65 changes: 65 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# WENV-KERNEL
# Jupyter kernel for Python on Wine
# https://github.com/pleiszenburg/wenv-kernel
#
# makefile: GNU makefile for project management
#
# Copyright (C) 2017-2019 Sebastian M. Ernst <[email protected]>
#
# <LICENSE_BLOCK>
# The contents of this file are subject to the GNU Lesser General Public License
# Version 2.1 ("LGPL" or "License"). You may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
# https://github.com/pleiszenburg/wenv-kernel/blob/master/LICENSE
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
# specific language governing rights and limitations under the License.
# </LICENSE_BLOCK>


clean:
-rm -r build/*
-rm -r dist/*
coverage erase
make clean_py
clean_py:
find src/ tests/ -name '*.pyc' -exec rm -f {} +
find src/ tests/ -name '*.pyo' -exec rm -f {} +
find src/ tests/ -name '*~' -exec rm -f {} +
find src/ tests/ -name '__pycache__' -exec rm -fr {} +

release_clean:
make clean
-rm -r src/*.egg-info

docu:
@(cd docs; make clean; make html)

release:
make release_clean
python setup.py sdist bdist_wheel
gpg --detach-sign -a dist/wenvkernel*.whl
gpg --detach-sign -a dist/wenvkernel*.tar.gz

upload:
for filename in $$(ls dist/*.tar.gz dist/*.whl) ; do \
twine upload $$filename $$filename.asc ; \
done

upload_test:
for filename in $$(ls dist/*.tar.gz dist/*.whl) ; do \
twine upload $$filename $$filename.asc -r pypitest ; \
done

install:
pip install -U -e .[dev]

test:
make docu
make test_quick

test_quick:
make clean
# pytest
14 changes: 14 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[metadata]
description-file = README.md
license_file = LICENSE

[tool:pytest]
testpaths = tests

[coverage:run]
branch = True
parallel = True

[coverage:paths]
source =
src/
117 changes: 117 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# -*- coding: utf-8 -*-

"""
WENV-KERNEL
Jupyter kernel for Python on Wine
https://github.com/pleiszenburg/wenv-kernel
setup.py: Used for package distribution
Copyright (C) 2017-2019 Sebastian M. Ernst <[email protected]>
<LICENSE_BLOCK>
The contents of this file are subject to the GNU Lesser General Public License
Version 2.1 ("LGPL" or "License"). You may not use this file except in
compliance with the License. You may obtain a copy of the License at
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
https://github.com/pleiszenburg/wenv-kernel/blob/master/LICENSE
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
specific language governing rights and limitations under the License.
</LICENSE_BLOCK>
"""


# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# IMPORT
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

from setuptools import (
find_packages,
setup
)
import os
from sys import platform


# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# SETUP
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


# Bump version HERE!
_version_ = '0.1.1'


# List all versions of Python which are supported
confirmed_python_versions = [
('Programming Language :: Python :: %s' % x)
for x in '3.4 3.5 3.6 3.7 3.8'.split()
]


# Fetch readme file
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as f:
long_description = f.read()


# Just in case someone is actually running this on Windows ...
if platform.startswith('win'):
raise SystemExit('You are already running Windows. No need for this package!')


setup(
name = 'wenvkernel',
packages = find_packages('src'),
package_dir = {'': 'src'},
version = _version_,
description = 'Jupyter kernel for Python on Wine',
long_description = long_description,
long_description_content_type = 'text/markdown',
author = 'Sebastian M. Ernst',
author_email = '[email protected]',
url = 'https://github.com/pleiszenburg/wenv-kernel',
download_url = 'https://github.com/pleiszenburg/wenv-kernel/archive/v%s.tar.gz' % _version_,
license = 'LGPLv2',
keywords = ['wine', 'cross platform'],
scripts = [],
include_package_data = True,
install_requires = [],
extras_require = {
'dev': [
'pytest',
'coverage',
'pytest-cov',
'python-language-server',
'setuptools',
'Sphinx',
'sphinx_rtd_theme',
'twine',
'wheel'
]
},
zip_safe = False,
entry_points = {},
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
'Operating System :: MacOS',
'Operating System :: POSIX :: BSD',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3'
] + confirmed_python_versions + [
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Scientific/Engineering',
'Topic :: Software Development',
'Topic :: System :: Operating System',
'Topic :: System :: Operating System Kernels',
'Topic :: Utilities'
]
)

0 comments on commit dae1de3

Please sign in to comment.