Форум сайта python.su
Здравствуйте, ОС Ubuntu 20.04, postgresql-12, устанавливаю skytools-2.1.12:
./configure --with-python=/usr/bin/python3 --with-pgconfig=/usr/lib/postgresql/12/bin/pg_config
checking for python... /usr/bin/python3 checking for pg_config... /usr/lib/postgresql/12/bin/pg_config checking for GNU make... make checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking unsetenv... yes configure: creating ./config.status config.status: creating config.mak postgres@ubuntu:~/skytools/skytools-2.1.12$
postgres@ubuntu:~/skytools/skytools-2.1.12$ make /usr/bin/python3 setup.py build File "setup.py", line 9 print "please run ./configure && make first" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("please run ./configure && make first")? make: *** [Makefile:16: python-all] Error 1 postgres@ubuntu:~/skytools/skytools-2.1.12$
#! /usr/bin/env python import sys, os.path, re, glob from distutils.core import setup from distutils.extension import Extension # check if configure has run if not os.path.isfile('config.mak'): print "please run ./configure && make first" print "Note: setup.py is supposed to be run from Makefile" sys.exit(1) # load version buf = open("configure.ac","r").read(256) m = re.search("AC_INIT[(][^,]*,\s+([^)]*)[)]", buf) ac_ver = m.group(1) share_dup_files = [ 'sql/pgq/pgq.sql', 'sql/londiste/londiste.sql', 'sql/pgq_ext/pgq_ext.sql', 'sql/logtriga/logtriga.sql', ] if os.path.isfile('sql/txid/txid.sql'): share_dup_files.append('sql/txid/txid.sql') # run actual setup setup( name = "skytools", license = "BSD", version = ac_ver, maintainer = "Marko Kreen", maintainer_email = "marko.kreen@skype.net", url = "http://pgfoundry.org/projects/skytools/", package_dir = {'': 'python'}, packages = ['skytools', 'londiste', 'pgq'], scripts = ['python/londiste.py', 'python/pgqadm.py', 'python/walmgr.py', 'scripts/cube_dispatcher.py', 'scripts/queue_mover.py', 'scripts/table_dispatcher.py', 'scripts/bulk_loader.py', 'scripts/scriptmgr.py', 'scripts/queue_splitter.py', 'scripts/skytools_upgrade.py', ], data_files = [ ('share/doc/skytools/conf', [ 'python/conf/londiste.ini', 'python/conf/pgqadm.ini', 'python/conf/skylog.ini', 'python/conf/wal-master.ini', 'python/conf/wal-slave.ini', 'scripts/queue_mover.ini.templ', 'scripts/queue_splitter.ini.templ', 'scripts/cube_dispatcher.ini.templ', 'scripts/table_dispatcher.ini.templ', 'scripts/bulk_loader.ini.templ'', 'scripts/scriptmgr.ini.templ', ]), ('share/skytools', share_dup_files), ('share/skytools/upgrade/final', glob.glob('upgrade/final/*.sql')), ], ext_modules=[Extension("skytools._cquoting", ['python/modules/cquoting.c'])], )
Офлайн
DuffyDuckДа ты ставишь просто неправильно. Какие скобки - забудь.
Насколько я понял, в файле setup.py который в том числе находится в этой директории, на 9 строке не хватает скобок, есть кто-нибудь, кто скажет где именно?
Отредактировано py.user.next (Дек. 6, 2021 20:07:49)
Офлайн