Skip to content

Commit

Permalink
Preparation of the pip release 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeySatskiy committed Aug 21, 2017
1 parent 926925f commit 7cb9726
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 16 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2017 Aug 20 Sergey Satskiy <sergey.satskiy@gmail.com>

* First python 3 release v.3.0.0
* Python 3.5 syntax covered

2016 Jul 22 Sergey Satskiy <sergey.satskiy@gmail.com>

* Release v.2.0.1 using the updated releasing procedure
Expand Down
7 changes: 4 additions & 3 deletions README.md
@@ -1,5 +1,6 @@
# cdm-pythonparser [![Build Status](https://travis-ci.org/SergeySatskiy/cdm-pythonparser.svg?branch=master)](https://travis-ci.org/SergeySatskiy/cdm-pythonparser)
cdm-pythonparser repository contains a source code for a Python 2 and Python 3 extension module called cdmpyparser.
## cdm-pythonparser [![Build Status](https://travis-ci.org/SergeySatskiy/cdm-pythonparser.svg?branch=master)](https://travis-ci.org/SergeySatskiy/cdm-pythonparser)
[cdm-pythonparser repository](https://github.com/SergeySatskiy/cdm-pythonparser) contains a source code for
a Python 2 and Python 3 extension module called `cdmpyparser`.
The module exposes a couple of functions which basically take a file with a python code or a character buffer,
parse it and provide back what is found in the code: functions, classes, global variables etc.

Expand Down Expand Up @@ -32,7 +33,7 @@ make localinstall
The latest Python 2 supporting release is 2.0.1. Both pre-built modules and source code are available in the releases area.
Here is a link: [latest Python 2 release 2.0.1](https://github.com/SergeySatskiy/cdm-pythonparser/releases/tag/v2.0.1).

If you like to build a python 2 module from sources please follow these steps:
If you like to build a Python 2 module from sources please follow these steps:

```shell
cd
Expand Down
39 changes: 30 additions & 9 deletions setup.py
@@ -1,4 +1,3 @@
#
# -*- coding: utf-8 -*-
#
# cdm-pythonparser - python 2 content parser used in Codimension to provide
Expand All @@ -20,13 +19,14 @@
#


from distutils.core import setup, Extension
from setuptools import setup, Extension
import os.path
import sys

long_description = """Fast and comprehensive Python language parser.
Written as a part of the Codimension project, this parser
aims at pulling the most data from Python sources while
exceeding the speed of existing parsers."""
description = 'Fast and comprehensive Python language parser. ' \
'Written as a part of the Codimension project, this parser ' \
'aims at pulling the most data from Python sources while ' \
'exceeding the speed of existing parsers.'

try:
version = os.environ['CDM_PROJECT_BUILD_VERSION']
Expand All @@ -39,21 +39,42 @@
except:
pass

try:
import pypandoc
converted = pypandoc.convert('README.md', 'rst').splitlines()
no_travis = [line for line in converted if 'travis-ci.org' not in line]
long_description = '\n'.join(no_travis)

# Pypi index does not like this link
long_description = long_description.replace('|Build Status|', '')
except:
print('pypandoc package is not installed: the markdown '
'README.md convertion tor rst failed', file=sys.stderr)
import io
# pandoc is not installed, fallback to using raw contents
with io.open('README.md', encoding='utf-8') as f:
long_description = f.read()


# install_requires=['pypandoc'] could be added but really it needs to only
# at the time of submitting a package to Pypi so it is excluded from the
# dependencies
setup(name='cdmpyparser',
description='Codimension Python Parser',
description=description,
python_requires='>=3.5',
long_description=long_description,
version=version,
author='Sergey Satskiy',
author_email='sergey.satskiy@gmail.com',
url='http://codimension.org/documentation/cdmpyparser.html',
url='https://github.com/SergeySatskiy/cdm-pythonparser',
license='GPLv3',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: POSIX :: Linux',
'Programming Language :: C',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules'],
platforms=['any'],
py_modules=['cdmpyparser'],
Expand Down
8 changes: 4 additions & 4 deletions utils/speed_test.py
Expand Up @@ -23,7 +23,7 @@
import os, os.path, sys
import datetime
import pyclbr
import cdmbriefparser
import cdmpyparser
import gc
import time

Expand Down Expand Up @@ -69,7 +69,7 @@ def cdmpyparserTest(files):
count = 0
for item in files:
# print("Processing " + item + " ...")
tempObj = cdmbriefparser.getBriefModuleInfoFromFile(item)
tempObj = cdmpyparser.getBriefModuleInfoFromFile(item)
if SHOW_ERRORS:
if not tempObj.isOK:
errorCount += 1
Expand All @@ -90,8 +90,8 @@ def deltaToFloat(delta):

print("Speed test compares the time required for "
"cdmpyparser and the standard pyclbr modules to collect module info.")
print("cdmpyparser version: " + cdmbriefparser.getVersion())
print("Module file: " + cdmbriefparser.__file__)
print("cdmpyparser version: " + cdmpyparser.getVersion())
print("Module file: " + cdmpyparser.__file__)
print("")


Expand Down

0 comments on commit 7cb9726

Please sign in to comment.