mirror of https://github.com/scrapy/scrapy.git
Changed Debian packaging to use the scrapy version in the package name, so we can have multiple Scrapy versions in the same apt repo
--HG-- rename : debian/scrapy.1 => debian/scrapy-files/scrapy.1 rename : debian/000-default => debian/scrapyd-files/000-default rename : debian/scrapyd.upstart => debian/scrapyd.scrapyd.upstart rename : debian/scrapy.1 => extras/scrapy.1
This commit is contained in:
parent
67adb2a05f
commit
a034d078c8
|
|
@ -0,0 +1,6 @@
|
|||
deb:
|
||||
python extras/makedeb.py build
|
||||
|
||||
deb-clean:
|
||||
debclean
|
||||
python extras/makedeb.py clean
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
scrapy (0.11) unstable; urgency=low
|
||||
scrapy-SUFFIX (0.11) unstable; urgency=low
|
||||
|
||||
* Initial release.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Source: scrapy
|
||||
Source: scrapy-SUFFIX
|
||||
Section: python
|
||||
Priority: optional
|
||||
Maintainer: Insophia Team <info@insophia.com>
|
||||
|
|
@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 7.0.50), python (>=2.5), python-twisted
|
|||
Standards-Version: 3.8.4
|
||||
Homepage: http://scrapy.org/
|
||||
|
||||
Package: scrapy
|
||||
Package: scrapy-SUFFIX
|
||||
Architecture: all
|
||||
Depends: ${python:Depends}, python-libxml2, python-twisted, python-openssl
|
||||
Conflicts: python-scrapy
|
||||
|
|
@ -17,7 +17,7 @@ Description: Python web crawling and scraping framework
|
|||
It can be used for a wide range of purposes, from data mining to
|
||||
monitoring and automated testing.
|
||||
|
||||
Package: scrapyd
|
||||
Package: scrapyd-SUFFIX
|
||||
Architecture: all
|
||||
Depends: scrapy, python-setuptools
|
||||
Description: Scrapy Service
|
||||
|
|
|
|||
|
|
@ -3,3 +3,6 @@
|
|||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_installinit:
|
||||
dh_installinit --name scrapyd
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
debian/scrapy.1
|
||||
debian/scrapy-files/scrapy.1
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
usr/lib/python*/*-packages/scrapyd
|
||||
debian/000-default etc/scrapyd/conf.d
|
||||
debian/scrapyd-files/000-default etc/scrapyd/conf.d
|
||||
extras/scrapyd.tac usr/share/scrapyd
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
import sys, os, glob
|
||||
from subprocess import check_call
|
||||
|
||||
def build(suffix):
|
||||
for ifn in glob.glob("debian/scrapy.*") + glob.glob("debian/scrapyd.*"):
|
||||
s = open(ifn).read()
|
||||
s = s.replace('SUFFIX', suffix)
|
||||
pre, suf = ifn.split('.', 1)
|
||||
ofn = "%s-%s.%s" % (pre, suffix, suf)
|
||||
with open(ofn, 'w') as of:
|
||||
of.write(s)
|
||||
|
||||
for ifn in ['debian/control', 'debian/changelog']:
|
||||
s = open(ifn).read()
|
||||
s = s.replace('SUFFIX', suffix)
|
||||
with open(ifn, 'w') as of:
|
||||
of.write(s)
|
||||
|
||||
check_call('debchange -m -D unstable --force-distribution -v $(python setup.py --version)-r$(hg tip --template "{rev}")+$(date +%s) "Automatic build"', shell=True)
|
||||
check_call('debuild -us -uc -b', shell=True)
|
||||
|
||||
def clean(suffix):
|
||||
for f in glob.glob("debian/scrapy-%s.*" % suffix) + \
|
||||
glob.glob("debian/scrapyd-%s.*" % suffix):
|
||||
os.remove(f)
|
||||
|
||||
def main():
|
||||
cmd = sys.argv[1]
|
||||
suffix = '%s.%s' % __import__('scrapy').version_info[:2]
|
||||
if cmd == 'build':
|
||||
build(suffix)
|
||||
elif cmd == 'clean':
|
||||
clean(suffix)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
.TH SCRAPY 1 "October 17, 2009"
|
||||
.SH NAME
|
||||
scrapy \- the Scrapy command-line tool
|
||||
.SH SYNOPSIS
|
||||
.B scrapy
|
||||
[\fIcommand\fR] [\fIOPTIONS\fR] ...
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Scrapy is controlled through the \fBscrapy\fR command-line tool. The script provides several commands, for different purposes. Each command supports its own particular syntax. In other words, each command supports a different set of arguments and options.
|
||||
.SH OPTIONS
|
||||
.SS fetch\fR [\fIOPTION\fR] \fIURL\fR
|
||||
.TP
|
||||
Fetch a URL using the Scrapy downloader
|
||||
.TP
|
||||
.I --headers
|
||||
Print response HTTP headers instead of body
|
||||
|
||||
.SS runspider\fR [\fIOPTION\fR] \fIspiderfile\fR
|
||||
Run a spider
|
||||
.TP
|
||||
.I --output=FILE
|
||||
Store scraped items to FILE in XML format
|
||||
|
||||
.SS settings [\fIOPTION\fR]
|
||||
Query Scrapy settings
|
||||
.TP
|
||||
.I --get=SETTING
|
||||
Print raw setting value
|
||||
.TP
|
||||
.I --getbool=SETTING
|
||||
Print setting value, intepreted as a boolean
|
||||
.TP
|
||||
.I --getint=SETTING
|
||||
Print setting value, intepreted as an integer
|
||||
.TP
|
||||
.I --getfloat=SETTING
|
||||
Print setting value, intepreted as an float
|
||||
.TP
|
||||
.I --getlist=SETTING
|
||||
Print setting value, intepreted as an float
|
||||
.TP
|
||||
.I --init
|
||||
Print initial setting value (before loading extensions and spiders)
|
||||
|
||||
.SS shell\fR \fIURL\fR | \fIfile\fR
|
||||
Launch the interactive scraping console
|
||||
|
||||
.SS startproject\fR \fIprojectname\fR
|
||||
Create new project with an initial project template
|
||||
|
||||
.SS --help, -h
|
||||
Print command help and options
|
||||
.SS --logfile=FILE
|
||||
Log file. if omitted stderr will be used
|
||||
.SS --loglevel=LEVEL, -L LEVEL
|
||||
Log level (default: None)
|
||||
.SS --nolog
|
||||
Disable logging completely
|
||||
.SS --spider=SPIDER
|
||||
Always use this spider when arguments are urls
|
||||
.SS --profile=FILE
|
||||
Write python cProfile stats to FILE
|
||||
.SS --lsprof=FILE
|
||||
Write lsprof profiling stats to FILE
|
||||
.SS --pidfile=FILE
|
||||
Write process ID to FILE
|
||||
.SS --set=SET
|
||||
Set/override setting (may be repeated)
|
||||
|
||||
.SH AUTHOR
|
||||
Scrapy was written by the Scrapy Developers
|
||||
<scrapy-developers@googlegroups.com>.
|
||||
.PP
|
||||
This manual page was written by Ignace Mouzannar <mouzannar@gmail.com>,
|
||||
for the Debian project (but may be used by others).
|
||||
Loading…
Reference in New Issue