Skip to content

Commit

Permalink
Make the package buildable
Browse files Browse the repository at this point in the history
This marks the package as pre-alpha and sets the version to `0.1.0`.
  • Loading branch information
DevL committed Mar 31, 2022
1 parent 04c2338 commit 4d038ac
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
PYTHON_VERSION ?= 3.8

dist: clean-dist
python3 setup.py sdist

venv: dev-packages.txt
virtualenv venv --python=${PYTHON_VERSION}
. venv/bin/activate && pip3 install --upgrade pip && pip3 install -r dev-packages.txt
Expand All @@ -15,6 +18,12 @@ focus-test: venv
@ . venv/bin/activate && flake8 src tests --exclude '#*,~*,.#*'

.PHONY: clean
clean:
clean: clean-dist
rm -rf venv
find . -name "*.pyc" -delete

.PHONY: clean-dist
clean-dist:
rm -rf build
rm -rf src/python_on_rails.egg-info
rm -rf dist
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

Lecture material for implementing certain Ruby-like behaviours in Python.

**NB:** This is heavily under development and subject to change. Expect breaking changes until the 1.0.0 release.

## Current Functionality

The links in the list of available modules, classes, methods, and functions below link to the corresponding Ruby documentation.
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[bdist_wheel]
universal = 0

[flake8]
max-line-length = 100
43 changes: 43 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
from os import path
from re import search
from setuptools import find_packages, setup


HERE = path.abspath(path.dirname(__file__))

with open(path.join(HERE, "README.md"), encoding="utf-8") as f:
README = f.read()

with open(path.join(HERE, "src", "pyby", "__init__.py"), encoding="utf-8") as f:
VERSION = search(r'VERSION = "(\d+\.\d+\.\d+)"', f.read()).group(1)

setup(
name="pyby",
version=VERSION,
description="A collection of Ruby behaviour ported to Python.",
license="MIT",
author="Lennart Fridén",
author_email="lennart@devl.se",
classifiers=[
"Development Status :: 2 - Pre-Alpha",
# "Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Ruby Modules",
],
keywords="Ruby Enumerable",
long_description=README,
long_description_content_type="text/markdown",
package_dir={"": "src"},
packages=find_packages(where="src"),
python_requires="~=3.8",
project_urls={
"Bug Reports": "https://github.com/DevL/pyby/issues",
"Source": "https://github.com/DevL/pyby",
},
url="https://github.com/DevL/pyby",
)
2 changes: 2 additions & 0 deletions src/pyby/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from .enumerator import Enumerator
from .object import respond_to, RObject

VERSION = "0.1.0"

__all__ = [
Enumerable,
EnumerableDict,
Expand Down

0 comments on commit 4d038ac

Please sign in to comment.