Skip to content

Commit

Permalink
Merge pull request #3 from EasyPost/issue-2
Browse files Browse the repository at this point in the history
Add pypi packaging
  • Loading branch information
ckarageorgkaneen authored Sep 1, 2021
2 parents d616d87 + 597d8b7 commit f16f439
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
47 changes: 47 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import io
import sys

try:
from setuptools import setup
except ImportError:
from distutils.core import setup


if sys.version_info < (3, 0):
long_description_open = io.open
else:
long_description_open = open

with long_description_open('README.md', encoding='utf-8') as f:
long_description = f.read()


setup(
name='pystatx',
version='0.1',
description='statx(2) wrapper',
url='https://github.com/ckarageorgkaneen/pystatx',
packages=['statx'],
long_description=long_description,
long_description_content_type='text/markdown',
project_urls={
'Tracker': 'https://github.com/ckarageorgkaneen/pystatx/issues',
'Source': 'https://github.com/ckarageorgkaneen/pystatx',
},
license='GPLv3',
python_requires='>=2.7',
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Intended Audience :: Developers",
"Operating System :: POSIX :: Linux",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Topic :: Software Development :: Libraries",
]
)
4 changes: 3 additions & 1 deletion statx.py → statx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@


def _get_syscall_number():
if platform.system() != 'Linux':
return None
machine = platform.machine()
if machine == 'x86_64':
return 332
Expand All @@ -26,7 +28,7 @@ def _get_syscall_func():
syscall_nr = _get_syscall_number()
if syscall_nr is None:
raise RuntimeError(
'Only x86, arm64, x86_64 and ppc64le machines are supported.')
'Only x86, arm64, x86_64 and ppc64le machines on Linux are supported.')
syscall = ctypes.CDLL(None).syscall
syscall.restype = ctypes.c_int
syscall.argtypes = [
Expand Down

0 comments on commit f16f439

Please sign in to comment.