Skip to content

Commit d194b99

Browse files
author
_
committed
make compatible with pypi
1 parent 3429de6 commit d194b99

File tree

9 files changed

+61
-23
lines changed

9 files changed

+61
-23
lines changed

.gitignore

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
TODO
2-
pfa
3-
pfai
4-
*.user
5-
*.includes
6-
*.defines
7-
*.creator
8-
*.files
9-
*.config
1+
old
2+
__pycache__
3+
*.pyc
4+
MANIFEST
5+
build
6+
dist
7+
pfa/pfa
108
*.o
11-
*.out.*
12-
/test/
13-
/results/

LICENSE.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2017 Manuel Stoeckl
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include MANIFEST.in
2+
include LICENSE.txt
3+
include README.md
4+
include pfa/pfa.c
5+
include pfa/__init__.py
6+
include setup.py

Makefile

Lines changed: 0 additions & 8 deletions
This file was deleted.

afmt.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

pfa/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
raise NotImplementedError("PFA can not yet be called directly through Python")

pfa.c renamed to pfa/pfa.c

File renamed without changes.

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[metadata]
2+
description-file = README.md

setup.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env python3
2+
from distutils.core import setup, Extension
3+
from distutils.command.build import build
4+
5+
class build_and_make_exec(build):
6+
def run(self):
7+
from distutils.ccompiler import new_compiler
8+
comp = new_compiler()
9+
comp.compile(['pfa/pfa.c'], extra_preargs=['-Wall',
10+
'-fno-omit-frame-pointer', '-Os'])
11+
comp.link_executable(['pfa/pfa.o'], 'pfa/pfa')
12+
comp.link_executable(['pfa/pfa.o'], 'pfa/pfai')
13+
build.run(self)
14+
15+
setup(name='pfa', packages=['pfa',], version='0.1',
16+
17+
author = "M Stoeckl",
18+
author_email = "[email protected]",
19+
maintainer = "M Stoeckl",
20+
maintainer_email = "[email protected]",
21+
22+
description = "Very fast and consistent (if ugly) autoformatting for Python",
23+
url = "https://github.com/mstoeckl/python-fast-autoformat",
24+
download_url = "https://github.com/mstoeckl/python-fast-autoformat/archive/0.1.tar.gz",
25+
26+
long_description = open("README.md").read(),
27+
28+
keywords = ['python', 'autoformat', 'c', 'fast', 'format', 'formatter'],
29+
30+
cmdclass = {'build':build_and_make_exec},
31+
32+
data_files = [('bin/', ['pfa/pfa', 'pfa/pfai'])],
33+
34+
classifiers = ["License :: OSI Approved :: MIT License",
35+
"Intended Audience :: Developers" "Programming Language :: C",
36+
"Programming Language :: Python :: 3",
37+
"Operating System :: POSIX :: Linux", "Topic :: Utilities"],
38+
)

0 commit comments

Comments
 (0)