Compare commits

...

4 Commits

Author SHA1 Message Date
Davide Andreoli c8d7bddb47 Do not try to build with Cython3
Thanks goes @rafspiny for pointing this out
2023-11-26 08:36:10 +01:00
Davide Andreoli 4bb6d9fa9f Update package metadata 2023-11-26 08:35:02 +01:00
Davide Andreoli 0b089a5623 Silence pycharm warnings in setup.py 2023-11-26 08:34:14 +01:00
Davide Andreoli a7464e66e6 Maintenance release 1.26.1 2023-10-08 05:45:50 +02:00
3 changed files with 42 additions and 22 deletions

View File

@ -1,3 +1,11 @@
===================
2023-10-08 v1.26.1
===================
Maintenance release:
* rebuilt using Cython 0.29.34 to fix install on python 3.11
===================
2022-02-27 v1.26.0
===================

View File

@ -64,15 +64,15 @@ The HTML generated documentation will be available in the folder: `build/sphinx/
## Some of the projects using Python-EFL (in random order)
| **Project** | **Website** |
| -- | -- |
| **EpyMC** - Media Center | https://github.com/DaveMDS/epymc |
| **Espionage** - D-Bus inspector | https://phab.enlightenment.org/w/projects/espionage/ |
| **Epour** - BitTorrent Client | https://phab.enlightenment.org/w/projects/epour/ |
| **Eluminance** - Fast photo browser | https://github.com/DaveMDS/eluminance |
| **Egitu** - Git User Interface | https://github.com/DaveMDS/egitu |
| **Edone** - GettingThingsDone | https://github.com/DaveMDS/edone |
| **Epack** - Archive extractor | https://github.com/wfx/epack |
| **Project** | **Website** |
|-------------------------------------|------------------------------------------------------|
| **EpyMC** - Media Center | https://github.com/DaveMDS/epymc |
| **Espionage** - D-Bus inspector | https://phab.enlightenment.org/w/projects/espionage/ |
| **Epour** - BitTorrent Client | https://phab.enlightenment.org/w/projects/epour/ |
| **Eluminance** - Fast photo browser | https://github.com/DaveMDS/eluminance |
| **Egitu** - Git User Interface | https://github.com/DaveMDS/egitu |
| **Edone** - GettingThingsDone | https://github.com/DaveMDS/edone |
| **Epack** - Archive extractor | https://github.com/wfx/epack |
... and many more that cannot fit in this short list. If have some code and want it in this list just let us know.

View File

@ -15,7 +15,8 @@ script_path = os.path.dirname(os.path.abspath(__file__))
# dependencies
EFL_MIN_VER = '1.26.0'
CYTHON_MIN_VERSION = '0.23.5'
CYTHON_MIN_VERSION = '0.29.34'
CYTHON_MAX_VERSION = '0.99.99'
CYTHON_BLACKLIST = ()
@ -24,6 +25,7 @@ def read_file(rel_path):
with open(os.path.join(script_path, rel_path)) as fp:
return fp.read()
def cmd_output(cmd):
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p.wait()
@ -35,6 +37,7 @@ def cmd_output(cmd):
return ''
return p.stdout.read().decode('utf-8').strip()
def get_version(rel_path):
for line in read_file(rel_path).splitlines():
if line.startswith('__version__'):
@ -90,6 +93,7 @@ elif os.path.exists(os.path.join(script_path, 'Makefile')):
# === pkg-config helper ===
def pkg_config(name, require, min_vers=None):
ver = None
try:
sys.stdout.write('Checking for %s: ' % name)
@ -103,7 +107,7 @@ def pkg_config(name, require, min_vers=None):
cflags = cmd_output('pkg-config --cflags %s' % require).split()
libs = cmd_output('pkg-config --libs %s' % require).split()
return (cflags, libs)
return cflags, libs
except (OSError, subprocess.CalledProcessError):
raise SystemExit('Did not find %s with pkg-config.' % name)
except AssertionError:
@ -130,7 +134,7 @@ if os.getenv('CFLAGS') is not None and '-fvisibility=' in os.environ['CFLAGS']:
os.environ['CFLAGS'] += ' -fvisibility=default'
if set(('build', 'build_ext', 'install', 'bdist', 'bdist_wheel', 'sdist')) & set(sys.argv):
if {'build', 'build_ext', 'install', 'bdist', 'bdist_wheel', 'sdist'} & set(sys.argv):
# === check cython version ===
sys.stdout.write('Checking for Cython: ')
if USE_CYTHON:
@ -139,13 +143,18 @@ if set(('build', 'build_ext', 'install', 'bdist', 'bdist_wheel', 'sdist')) & set
import Cython
import Cython.Compiler.Options
except ImportError:
raise SystemExit('not found! Needed >= %s' % (CYTHON_MIN_VERSION))
raise SystemExit('not found! Needed >= %s' % CYTHON_MIN_VERSION)
# check min version
if Version(Cython.__version__) < Version(CYTHON_MIN_VERSION):
raise SystemExit('too old! Found %s Needed %s' % (
raise SystemExit('too old! Found %s (need at least %s)' % (
Cython.__version__, CYTHON_MIN_VERSION))
# check max version
if Version(Cython.__version__) > Version(CYTHON_MAX_VERSION):
raise SystemExit('too new! Found %s (need at most %s)' % (
Cython.__version__, CYTHON_MAX_VERSION))
# check black-listed releases
if Cython.__version__.startswith(CYTHON_BLACKLIST):
raise SystemExit('found %s, its broken! Need another release' %
@ -304,8 +313,8 @@ if set(('build', 'build_ext', 'install', 'bdist', 'bdist_wheel', 'sdist')) & set
ext_modules,
include_path=['include'],
compiler_directives={
#'c_string_type': 'unicode',
#'c_string_encoding': 'utf-8',
# 'c_string_type': 'unicode',
# 'c_string_encoding': 'utf-8',
'embedsignature': True,
'binding': True,
'language_level': 2,
@ -377,13 +386,16 @@ class CleanGenerated(Command):
if fname.endswith(('.c', '.html')) and fname != 'e_dbus.c':
self.remove(os.path.join(root, fname))
def remove(self, fullpath):
@staticmethod
def remove(fullpath):
print('removing %s' % fullpath.replace(script_path, '').lstrip('/'))
os.remove(fullpath)
# === setup.py uninstall command ===
RECORD_FILE = 'installed_files-%d.%d.txt' % sys.version_info[:2]
RECORD_FILE = 'installed_files-%d.%d.txt' % (sys.version_info[0], sys.version_info[1])
class Uninstall(Command):
description = 'remove all the installed files recorded at installation time'
user_options = []
@ -394,7 +406,8 @@ class Uninstall(Command):
def finalize_options(self):
pass
def remove_entry(self, entry):
@staticmethod
def remove_entry(entry):
if os.path.isfile(entry):
try:
print('removing file %s' % entry)
@ -404,7 +417,7 @@ class Uninstall(Command):
return
directory = os.path.dirname(entry)
while os.listdir(directory) == []:
while not os.listdir(directory):
try:
print('removing empty directory %s' % directory)
os.rmdir(directory)
@ -432,7 +445,7 @@ setup(
author_email='dave@gurumeditation.it, kai.huuhko@gmail.com',
contact='Enlightenment developer mailing list',
contact_email='enlightenment-devel@lists.sourceforge.net',
url='http://www.enlightenment.org',
url='https://www.enlightenment.org',
license='GNU Lesser General Public License (LGPL)',
keywords='efl wrapper binding enlightenment eo evas ecore edje emotion elementary ethumb',
classifiers=[
@ -444,7 +457,6 @@ setup(
'Operating System :: POSIX',
'Programming Language :: C',
'Programming Language :: Cython',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: User Interfaces',